chore(exhook): fix dialyzer warnings

This commit is contained in:
JianBo He 2021-07-31 14:40:03 +08:00
parent 922aa7aae5
commit 604e282978
2 changed files with 2 additions and 7 deletions

View File

@ -106,7 +106,6 @@ call_fold(Hookpoint, Req, AccFun, [ServiceName|More]) ->
%%---------------------------------------------------------- %%----------------------------------------------------------
%% Storage %% Storage
-compile({inline, [save/2]}).
save(Name, ServiceState) -> save(Name, ServiceState) ->
Saved = persistent_term:get(?APP, []), Saved = persistent_term:get(?APP, []),
persistent_term:put(?APP, lists:reverse([Name | Saved])), persistent_term:put(?APP, lists:reverse([Name | Saved])),

View File

@ -40,7 +40,7 @@
%% Server name (equal to grpc client channel name) %% Server name (equal to grpc client channel name)
name :: server_name(), name :: server_name(),
%% The server started options %% The server started options
options :: list(), options :: options(),
%% gRPC channel pid %% gRPC channel pid
channel :: pid(), channel :: pid(),
%% Registered hook names and options %% Registered hook names and options
@ -142,11 +142,7 @@ channel_opts(Opts = #{url := URL}) ->
error(bad_server_url) error(bad_server_url)
end. end.
format_http_uri(Scheme, Host0, Port) -> format_http_uri(Scheme, Host, Port) ->
Host = case is_tuple(Host0) of
true -> inet:ntoa(Host0);
_ -> Host0
end,
lists:flatten(io_lib:format("~s://~s:~w", [Scheme, Host, Port])). lists:flatten(io_lib:format("~s://~s:~w", [Scheme, Host, Port])).
filter(Ls) -> filter(Ls) ->