From 72c469658478d19522d9848be39409cb1db1febf Mon Sep 17 00:00:00 2001 From: zhouzb Date: Tue, 1 Jun 2021 16:11:28 +0800 Subject: [PATCH] chore(newline): insert final newline --- .../src/emqx_authentication.erl | 7 +------ .../src/emqx_authentication_api.erl | 14 +++++++------- .../src/emqx_authentication_app.erl | 1 - .../src/emqx_authentication_mnesia.erl | 4 ---- .../src/emqx_authentication_sup.erl | 2 +- 5 files changed, 9 insertions(+), 19 deletions(-) diff --git a/apps/emqx_authentication/src/emqx_authentication.erl b/apps/emqx_authentication/src/emqx_authentication.erl index 1ee5f46bc..c41ca9249 100644 --- a/apps/emqx_authentication/src/emqx_authentication.erl +++ b/apps/emqx_authentication/src/emqx_authentication.erl @@ -89,14 +89,9 @@ enable() -> ok -> ok; {error, already_exists} -> ok end. - % case emqx:hook('client.enhanced_authenticate', fun emqx_authentication:enhanced_authenticate/2) of - % ok -> ok; - % {error, already_exists} -> ok - % end. disable() -> emqx:unhook('client.authenticate', fun emqx_authentication:authenticate/1), - % emqx:unhook('client.enhanced_authenticate', {}), ok. authenticate(#{chain_id := ChainID} = ClientInfo) -> @@ -522,4 +517,4 @@ trans(Fun, Args) -> case mnesia:transaction(Fun, Args) of {atomic, Res} -> Res; {aborted, Reason} -> {error, Reason} - end. \ No newline at end of file + end. diff --git a/apps/emqx_authentication/src/emqx_authentication_api.erl b/apps/emqx_authentication/src/emqx_authentication_api.erl index 443091664..f43e5c0df 100644 --- a/apps/emqx_authentication/src/emqx_authentication_api.erl +++ b/apps/emqx_authentication/src/emqx_authentication_api.erl @@ -398,10 +398,10 @@ serialize_type(service_type) -> "Service type". get_missed_params(Actual, Expected) -> - Keys = lists:fold(fun(Key, Acc) -> - case maps:is_key(Key, Actual) of - true -> Acc; - false -> [Key | Acc] - end - end, [], Expected), - lists:reverse(Keys). \ No newline at end of file + Keys = lists:foldl(fun(Key, Acc) -> + case maps:is_key(Key, Actual) of + true -> Acc; + false -> [Key | Acc] + end + end, [], Expected), + lists:reverse(Keys). diff --git a/apps/emqx_authentication/src/emqx_authentication_app.erl b/apps/emqx_authentication/src/emqx_authentication_app.erl index bfdbefb36..2d395def7 100644 --- a/apps/emqx_authentication/src/emqx_authentication_app.erl +++ b/apps/emqx_authentication/src/emqx_authentication_app.erl @@ -32,4 +32,3 @@ start(_StartType, _StartArgs) -> stop(_State) -> ok. - diff --git a/apps/emqx_authentication/src/emqx_authentication_mnesia.erl b/apps/emqx_authentication/src/emqx_authentication_mnesia.erl index 9cc077452..08e0cf98e 100644 --- a/apps/emqx_authentication/src/emqx_authentication_mnesia.erl +++ b/apps/emqx_authentication/src/emqx_authentication_mnesia.erl @@ -287,7 +287,3 @@ to_binary(B) when is_binary(B) -> B; to_binary(L) when is_list(L) -> iolist_to_binary(L). - - - - diff --git a/apps/emqx_authentication/src/emqx_authentication_sup.erl b/apps/emqx_authentication/src/emqx_authentication_sup.erl index a36617ac8..06e12ce6c 100644 --- a/apps/emqx_authentication/src/emqx_authentication_sup.erl +++ b/apps/emqx_authentication/src/emqx_authentication_sup.erl @@ -26,4 +26,4 @@ start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). init([]) -> - {ok, {{one_for_one, 10, 10}, []}}. \ No newline at end of file + {ok, {{one_for_one, 10, 10}, []}}.