Skip to content

Commit

Permalink
Fix dialyzer warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
prefiks committed Dec 17, 2024
1 parent 0fd6afa commit 0fe833b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/xmpp_sasl.erl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
-record(sasl_state, {server_host :: binary(),
mech_name = <<"">> :: mechanism(),
mech_state :: mech_state(),
callbacks :: #{ atom => fun() | undefined }}).
callbacks :: map()}).

-type mechanism() :: binary().
-type mech_state() :: term().
Expand All @@ -45,11 +45,13 @@
-type sasl_return() :: {ok, [sasl_property()]} |
{ok, [sasl_property()], binary()} |
{continue, binary(), sasl_state()} |
{error, error_reason(), binary()}.
{error, error_reason(), binary()} |
{error, error_reason()}.
-type error_reason() :: xmpp_sasl_digest:error_reason() |
xmpp_sasl_oauth:error_reason() |
xmpp_sasl_plain:error_reason() |
xmpp_sasl_scram:error_reason() |
xmpp_sasl_fast:error_reason() |
unsupported_mechanism | nodeprep_failed |
empty_username | aborted.

Expand Down
4 changes: 2 additions & 2 deletions src/xmpp_sasl_fast.erl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

-record(state, {mech, cb, ua, get_fast_tokens}).
-type error_reason() :: incompatible_mechs | missing_ua | bad_channel_binding |
parser_failed | not_authorized | {atom(), binary()}.
parser_failed | not_authorized | {atom(), binary()}.
-export_type([error_reason/0]).

-spec format_error(error_reason()) -> {atom(), binary()}.
Expand Down Expand Up @@ -101,7 +101,7 @@ mech_step(State, ClientIn) ->
{error, parser_failed}
end.

-spec prepare(binary()) -> {binary(), binary(), binary()} | error.
-spec prepare(binary()) -> {binary(), binary()} | error.
prepare(ClientIn) ->
case parse(ClientIn) of
[User, Hash] ->
Expand Down

0 comments on commit 0fe833b

Please sign in to comment.