Fix compilation warning in DeviceCache

- Group handle_info/2 clauses together
- This fixes the warning about clauses with same name/arity
- Now compiles cleanly with --warnings-as-errors

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Graham McIntire 2025-07-26 16:35:07 -05:00
parent ddd405940e
commit e8847ba83c
No known key found for this signature in database

View file

@ -59,6 +59,18 @@ defmodule Aprsme.DeviceCache do
{:ok, %{initial_load_done: false}}
end
@impl true
def handle_call(:refresh_cache, _from, state) do
result = load_devices_into_cache()
{:reply, result, state}
end
@impl true
def handle_cast(:refresh_cache_async, state) do
load_devices_into_cache()
{:noreply, state}
end
@impl true
def handle_info(:initial_load, state) do
# Load devices on startup
@ -75,19 +87,6 @@ defmodule Aprsme.DeviceCache do
end
end
@impl true
def handle_call(:refresh_cache, _from, state) do
result = load_devices_into_cache()
{:reply, result, state}
end
@impl true
def handle_cast(:refresh_cache_async, state) do
load_devices_into_cache()
{:noreply, state}
end
@impl true
def handle_info(:refresh_cache, state) do
load_devices_into_cache()