Skip to content

Commit f09f247

Browse files
authored
Add an explicit step to a range (#15)
Without this, the line emits a warning when compiled with Elixir 1.17.
1 parent 08f5701 commit f09f247

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/hpax/table.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ defmodule HPAX.Table do
157157
end
158158

159159
def lookup_by_index(%__MODULE__{entries: entries, length: length}, index)
160-
when index in @dynamic_table_start..(@dynamic_table_start + length - 1) do
160+
when index >= @dynamic_table_start and index <= @dynamic_table_start + length - 1 do
161161
{:ok, Enum.at(entries, index - @dynamic_table_start)}
162162
end
163163

0 commit comments

Comments
 (0)