Skip to content

Commit

Permalink
Merge pull request #368 from hypno2000/master
Browse files Browse the repository at this point in the history
Fix elixir 1.17 warnings
  • Loading branch information
sleipnir authored Jun 21, 2024
2 parents c62dafc + e75b566 commit 4526427
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/grpc/server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ defmodule GRPC.Server do
codecs = if http_transcode, do: [GRPC.Codec.JSON | codecs], else: codecs

routes =
for {name, _, _, options} = rpc <- service_mod.__rpc_calls__, reduce: [] do
for {name, _, _, options} = rpc <- service_mod.__rpc_calls__(), reduce: [] do
acc ->
path = "/#{service_name}/#{name}"

Expand All @@ -147,7 +147,7 @@ defmodule GRPC.Server do
[{:grpc, path} | acc]
end

Enum.each(service_mod.__rpc_calls__, fn {name, _, _, options} = rpc ->
Enum.each(service_mod.__rpc_calls__(), fn {name, _, _, options} = rpc ->
func_name = name |> to_string |> Macro.underscore() |> String.to_atom()
path = "/#{service_name}/#{name}"
grpc_type = GRPC.Service.grpc_type(rpc)
Expand Down
4 changes: 2 additions & 2 deletions lib/grpc/stub.ex
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ defmodule GRPC.Stub do
service_mod = opts[:service]
service_name = service_mod.__meta__(:name)

Enum.each(service_mod.__rpc_calls__, fn {name, {_, req_stream}, {_, res_stream}, _options} =
rpc ->
Enum.each(service_mod.__rpc_calls__(), fn {name, {_, req_stream}, {_, res_stream}, _options} =
rpc ->
func_name = name |> to_string |> Macro.underscore()
path = "/#{service_name}/#{name}"
grpc_type = GRPC.Service.grpc_type(rpc)
Expand Down

0 comments on commit 4526427

Please sign in to comment.