fix: elvis warning
This commit is contained in:
parent
f051424b3b
commit
267fd398a6
|
@ -107,7 +107,7 @@
|
|||
|
||||
%% limiter timers
|
||||
limiter_timer :: undefined | reference()
|
||||
}).
|
||||
}).
|
||||
|
||||
-record(retry, { types :: list(limiter_type())
|
||||
, data :: any()
|
||||
|
|
|
@ -310,11 +310,9 @@ gen_id(Len) ->
|
|||
int_to_hex(R, Len).
|
||||
|
||||
-spec clamp(number(), number(), number()) -> number().
|
||||
clamp(Val, Min, Max) ->
|
||||
if Val < Min -> Min;
|
||||
Val > Max -> Max;
|
||||
true -> Val
|
||||
end.
|
||||
clamp(Val, Min, _Max) when Val < Min -> Min;
|
||||
clamp(Val, _Min, Max) when Val > Max -> Max;
|
||||
clamp(Val, _Min, _Max) -> Val.
|
||||
|
||||
%% @doc https://www.erlang.org/doc/man/file.html#posix-error-codes
|
||||
explain_posix(eacces) -> "Permission denied";
|
||||
|
|
Loading…
Reference in New Issue