chore: make dialyzer happy

This commit is contained in:
Zhongwen Deng 2022-10-26 17:51:40 +08:00
parent a3f877656e
commit 1757342e5b
2 changed files with 17 additions and 11 deletions

View File

@ -1,11 +1,18 @@
%%%------------------------------------------------------------------- %%--------------------------------------------------------------------
%%% @author zhongwen %% Copyright (c) 2020-2022 EMQ Technologies Co., Ltd. All Rights Reserved.
%%% @copyright (C) 2022, <COMPANY> %%
%%% @doc %% Licensed under the Apache License, Version 2.0 (the "License");
%%% %% you may not use this file except in compliance with the License.
%%% @end %% You may obtain a copy of the License at
%%% Created : 26. 10 2022 11:14 %%
%%%------------------------------------------------------------------- %% http://www.apache.org/licenses/LICENSE-2.0
%%
%% Unless required by applicable law or agreed to in writing, software
%% distributed under the License is distributed on an "AS IS" BASIS,
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
%% See the License for the specific language governing permissions and
%% limitations under the License.
%%--------------------------------------------------------------------
-module(emqx_prometheus_config). -module(emqx_prometheus_config).
-behaviour(emqx_config_handler). -behaviour(emqx_config_handler).
@ -40,8 +47,7 @@ remove_handler() ->
post_config_update(?PROMETHEUS, _Req, New, _Old, AppEnvs) -> post_config_update(?PROMETHEUS, _Req, New, _Old, AppEnvs) ->
application:set_env(AppEnvs), application:set_env(AppEnvs),
update_prometheus(New), update_prometheus(New);
ok;
post_config_update(_ConfPath, _Req, _NewConf, _OldConf, _AppEnvs) -> post_config_update(_ConfPath, _Req, _NewConf, _OldConf, _AppEnvs) ->
ok. ok.

View File

@ -68,4 +68,4 @@ init([]) ->
assert_started({ok, _Pid}) -> ok; assert_started({ok, _Pid}) -> ok;
assert_started({ok, _Pid, _Info}) -> ok; assert_started({ok, _Pid, _Info}) -> ok;
assert_started({error, {already_started, _Pid}}) -> ok; assert_started({error, {already_started, _Pid}}) -> ok;
assert_started({error, Reason}) -> erlang:error(Reason). assert_started({error, Reason}) -> {error, Reason}.