Merge pull request #25 from ayo-dele/fix-dialyzier-warnings

fix(ecpool.erl): Dialyzer warnings
This commit is contained in:
Zaiming Shi 2020-11-25 13:50:03 +01:00 committed by GitHub
commit 597233a325
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
{"0.5.0",
{<<"0\.5\..+">>,
[
{"0.4.2", [
{load_module, ecpool_worker, brutal_purge, soft_purge, []},

View File

@ -84,12 +84,12 @@ add_reconnect_callback(Pool, Callback) ->
%% to avoid applying action failure with 'badfun'.
%%
%% @doc Call the fun with client/connection
-spec(with_client(atom(), fun((Client :: pid()) -> any())) -> no_return()).
-spec(with_client(atom(), fun((Client :: pid()) -> any())) -> any()).
with_client(Pool, Fun) when is_atom(Pool) ->
with_worker(gproc_pool:pick_worker(name(Pool)), Fun, no_handover).
%% @doc Call the fun with client/connection
-spec(with_client(atom(), any(), fun((Client :: pid()) -> term())) -> no_return()).
-spec(with_client(atom(), any(), fun((Client :: pid()) -> term())) -> any()).
with_client(Pool, Key, Fun) when is_atom(Pool) ->
with_worker(gproc_pool:pick_worker(name(Pool), Key), Fun, no_handover).