chore(dialyzer): make code pass dialyzer

This commit is contained in:
zhouzb 2021-06-10 16:18:50 +08:00
parent bb62b44554
commit cbc5c64a16
3 changed files with 6 additions and 6 deletions

View File

@ -36,6 +36,6 @@
-record(chain,
{ id :: chain_id()
, services :: [#service{}]
, services :: [{service_name(), #service{}}]
, created_at :: integer()
}).

View File

@ -131,7 +131,7 @@ authenticate(ClientInfo = #{password := JWT}, #{jwk := JWK,
destroy(#{jwks_connector := undefined}) ->
ok;
destroy(#{jwks_connector := Connector}) ->
emqx_authentication_jwks_connector:stop(Connector),
_ = emqx_authentication_jwks_connector:stop(Connector),
ok.
%%--------------------------------------------------------------------
@ -171,7 +171,7 @@ do_create(#{use_jwks := true} = Opts) ->
do_update(Opts, #{jwk_connector := undefined}) ->
do_create(Opts);
do_update(#{use_jwks := false} = Opts, #{jwk_connector := Connector}) ->
emqx_authentication_jwks_connector:stop(Connector),
_ = emqx_authentication_jwks_connector:stop(Connector),
do_create(Opts);
do_update(#{use_jwks := true} = Opts, #{jwk_connector := Connector} = State) ->
ok = emqx_authentication_jwks_connector:update(Connector, Opts),

View File

@ -119,8 +119,8 @@ authenticate(ClientInfo = #{password := Password},
destroy(#{user_group := UserGroup}) ->
trans(
fun() ->
MatchSpec = [{#user_info{user_id = {UserGroup, '_'}, _ = '_'}, [], ['$_']}],
lists:foreach(fun delete_user2/1, mnesia:select(?TAB, MatchSpec, write))
MatchSpec = [{{user_info, {UserGroup, '_'}, '_', '_'}, [], ['$_']}],
ok = lists:foreach(fun delete_user2/1, mnesia:select(?TAB, MatchSpec, write))
end).
import_users(Filename0, State) ->
@ -211,7 +211,7 @@ import_users_from_csv(Filename, #{user_group := UserGroup}) ->
case get_csv_header(File) of
{ok, Seq} ->
Result = trans(fun import/3, [UserGroup, File, Seq]),
file:close(File),
_ = file:close(File),
Result;
{error, Reason} ->
{error, Reason}