Skip to content

Commit 832f315

Browse files
committed
fix warnings
1 parent 59eedcd commit 832f315

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/phoenix/sync/router.ex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ defmodule Phoenix.Sync.Router do
9494
more details on keyword-based shapes.
9595
"""
9696
defmacro sync(path, opts) when is_list(opts) do
97-
route(env!(__CALLER__), path, build_definition(path, __CALLER__, opts))
97+
route(env!(__CALLER__), path, build_definition(__CALLER__, opts))
9898
end
9999

100100
# e.g. shape "/path", Ecto.Query.from(t in MyTable)
@@ -140,13 +140,13 @@ defmodule Phoenix.Sync.Router do
140140
end
141141
end
142142

143-
defp build_definition(path, caller, opts) when is_list(opts) do
143+
defp build_definition(caller, opts) when is_list(opts) do
144144
case Keyword.fetch(opts, :query) do
145145
{:ok, queryable} ->
146146
build_shape_from_query(queryable, caller, opts)
147147

148148
:error ->
149-
define_shape(path, caller, opts)
149+
define_shape(caller, opts)
150150
end
151151
end
152152

@@ -167,15 +167,15 @@ defmodule Phoenix.Sync.Router do
167167
end
168168
end
169169

170-
defp define_shape(path, caller, opts) do
171-
relation = build_relation(path, opts)
170+
defp define_shape(caller, opts) do
171+
relation = build_relation(opts)
172172

173173
{storage, _binding} = Code.eval_quoted(opts[:storage], [], caller)
174174

175175
Phoenix.Sync.PredefinedShape.new!(Keyword.merge(opts, relation), storage: storage)
176176
end
177177

178-
defp build_relation(path, opts) do
178+
defp build_relation(opts) do
179179
case Keyword.fetch(opts, :table) do
180180
{:ok, table} ->
181181
[table: table]

0 commit comments

Comments
 (0)