fix(eme): destructure :timer.send_interval return, silence dialyzer

EmeLive.mount/3 dropped the {:ok, tref()} return from send_interval
on the floor. Elixir 1.19 + :unmatched_returns dialyzer flag catches
the discarded tuple; the if/else with explicit :ok arms keeps both
branches typed as :ok.
This commit is contained in:
Graham McIntire 2026-04-24 09:30:42 -05:00
parent 1e8dd7036d
commit 2900b9a959
No known key found for this signature in database
GPG key ID: F4ABF488E6029E59

View file

@ -39,7 +39,10 @@ defmodule MicrowavepropWeb.EmeLive do
@impl true
def mount(_params, _session, socket) do
if connected?(socket) do
:timer.send_interval(@tick_ms, self(), :tick)
{:ok, _tref} = :timer.send_interval(@tick_ms, self(), :tick)
:ok
else
:ok
end
{:ok,