Skip to content

Commit 755a285

Browse files
committed
fix warnings
1 parent 6bb4da4 commit 755a285

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

lib/phoenix/sync/electric.ex

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -282,15 +282,10 @@ defmodule Phoenix.Sync.Electric do
282282

283283
if @electric_available? do
284284
defp plug_opts(env, :embedded, electric_opts) do
285-
if electric_available?() do
286-
env
287-
|> core_configuration(electric_opts)
288-
|> Electric.Application.api_plug_opts()
289-
|> Keyword.fetch!(:api)
290-
else
291-
raise RuntimeError,
292-
message: "Configured for embedded mode but `:electric` dependency not installed"
293-
end
285+
env
286+
|> core_configuration(electric_opts)
287+
|> Electric.Application.api_plug_opts()
288+
|> Keyword.fetch!(:api)
294289
end
295290
else
296291
defp plug_opts(_env, :embedded, _electric_opts) do

lib/phoenix/sync/plug.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ defmodule Phoenix.Sync.Plug do
395395
end
396396
397397
"""
398-
@spec send_configuration(Plug.Conn.t(), Phoenix.Sync.shape_definition(), Client.t()) ::
398+
@spec send_configuration(Plug.Conn.t(), Phoenix.Sync.shape_definition(), Electric.Client.t()) ::
399399
Plug.Conn.t()
400400
def send_configuration(conn, shape_or_queryable, client \\ Phoenix.Sync.client!()) do
401401
shape = normalise_shape(shape_or_queryable)

0 commit comments

Comments
 (0)