Skip to content

Commit 4526427

Browse files
authored
Merge pull request #368 from hypno2000/master
Fix elixir 1.17 warnings
2 parents c62dafc + e75b566 commit 4526427

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/grpc/server.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ defmodule GRPC.Server do
131131
codecs = if http_transcode, do: [GRPC.Codec.JSON | codecs], else: codecs
132132

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

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

150-
Enum.each(service_mod.__rpc_calls__, fn {name, _, _, options} = rpc ->
150+
Enum.each(service_mod.__rpc_calls__(), fn {name, _, _, options} = rpc ->
151151
func_name = name |> to_string |> Macro.underscore() |> String.to_atom()
152152
path = "/#{service_name}/#{name}"
153153
grpc_type = GRPC.Service.grpc_type(rpc)

lib/grpc/stub.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ defmodule GRPC.Stub do
6262
service_mod = opts[:service]
6363
service_name = service_mod.__meta__(:name)
6464

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

0 commit comments

Comments
 (0)