Skip to content

Commit

Permalink
Add an explicit negative step to a ranger that counts down
Browse files Browse the repository at this point in the history
Without an explicit step this emits a warning in Elixir 1.17.
  • Loading branch information
alco committed May 24, 2024
1 parent 6a7b69f commit 3d87151
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mint/web_socket/frame.ex
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ defmodule Mint.WebSocket.Frame do
# n=4 is the happy path
# n=3..1 catches cases where the remaining byte_size/1 of the payload is shorter
# than the mask
for n <- 4..1 do
for n <- 4..1//-1 do

Check failure on line 186 in lib/mint/web_socket/frame.ex

View workflow job for this annotation

GitHub Actions / Test (Elixir 1.10, OTP 21.3)

** (SyntaxError) lib/mint/web_socket/frame.ex:186: syntax error before: '/'
def apply_mask(
<<part_key::integer-size(8)-unit(unquote(n)), payload_rest::binary>>,
<<mask_key::integer-size(8)-unit(unquote(n)), _::binary>> = mask,
Expand Down

0 comments on commit 3d87151

Please sign in to comment.