Skip to content

Commit e99f2d6

Browse files
committed
Satisfy 1.19 compiler
1 parent fee9b60 commit e99f2d6

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/boombox/packet.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ defmodule Boombox.Packet do
2525
defstruct @enforce_keys ++ [format: %{}]
2626

2727
@spec update_payload(t(), (payload() -> payload())) :: t()
28-
def update_payload(packet, fun) do
28+
def update_payload(%__MODULE__{} = packet, fun) do
2929
%__MODULE__{packet | payload: fun.(packet.payload)}
3030
end
3131
end

lib/boombox/server.ex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ defmodule Boombox.Server do
4040
name: GenServer.name(),
4141
packet_serialization: boolean(),
4242
stop_application: boolean(),
43-
communication_medium: communication_medium()
43+
communication_medium: communication_medium(),
44+
parent_pid: pid()
4445
]
4546

4647
@type boombox_opts :: [
@@ -285,7 +286,7 @@ defmodule Boombox.Server do
285286
end
286287

287288
@impl true
288-
def handle_info({boombox_elixir_element, pid}, state)
289+
def handle_info({boombox_elixir_element, pid}, %State{} = state)
289290
when boombox_elixir_element in [:boombox_elixir_source, :boombox_elixir_sink] do
290291
reply(state.current_client, state.boombox_mode)
291292

@@ -403,7 +404,7 @@ defmodule Boombox.Server do
403404

404405
@spec handle_request({:run, boombox_opts()}, GenServer.from() | Process.dest(), State.t()) ::
405406
{:noreply, State.t()}
406-
defp handle_request({:run, boombox_opts}, from, state) do
407+
defp handle_request({:run, boombox_opts}, from, %State{} = state) do
407408
boombox_mode = get_boombox_mode(boombox_opts)
408409

409410
%{supervisor: pipeline_supervisor, pipeline: pipeline} =

0 commit comments

Comments
 (0)