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:
parent
ddd405940e
commit
e8847ba83c
1 changed files with 12 additions and 13 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue