Skip to content

Commit ec213f2

Browse files
hyperpolymathclaude
andcommitted
fix: move @max_indexes before first use to fix type comparison warning
Module attribute was defined after its use in handle_call, causing Elixir to compare map_size against nil. lith-http now compiles with 0 warnings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent decfe98 commit ec213f2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lithoglyph/lith-http/lib/lith_http/temporal_index.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ defmodule LithHttp.TemporalIndex do
2020

2121
@table_prefix :temporal_index_
2222

23+
# Maximum number of temporal indexes to prevent atom table exhaustion.
24+
# Each index creates one atom for the ETS named table.
25+
@max_indexes 10_000
26+
2327
# Client API
2428

2529
def start_link(_opts) do
@@ -212,10 +216,6 @@ defmodule LithHttp.TemporalIndex do
212216
end
213217
end
214218

215-
# Maximum number of temporal indexes to prevent atom table exhaustion.
216-
# Each index creates one atom for the ETS named table.
217-
@max_indexes 10_000
218-
219219
# Private functions
220220

221221
@doc false

0 commit comments

Comments
 (0)