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:
parent
1e8dd7036d
commit
2900b9a959
1 changed files with 4 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue