From e8847ba83c6b59eb05245c15ccf1cb69c8c61393 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sat, 26 Jul 2025 16:35:07 -0500 Subject: [PATCH] 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 --- lib/aprsme/device_cache.ex | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/lib/aprsme/device_cache.ex b/lib/aprsme/device_cache.ex index da75e82..3d0abda 100644 --- a/lib/aprsme/device_cache.ex +++ b/lib/aprsme/device_cache.ex @@ -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()