From 3d8715125bcfd318c9adf260a6494efce5a6df39 Mon Sep 17 00:00:00 2001 From: Oleksii Sholik Date: Fri, 24 May 2024 23:21:39 +0300 Subject: [PATCH] Add an explicit negative step to a ranger that counts down Without an explicit step this emits a warning in Elixir 1.17. --- lib/mint/web_socket/frame.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mint/web_socket/frame.ex b/lib/mint/web_socket/frame.ex index ee2eaa06..d7afb714 100644 --- a/lib/mint/web_socket/frame.ex +++ b/lib/mint/web_socket/frame.ex @@ -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 def apply_mask( <>, <> = mask,