Skip to content

Commit

Permalink
fix dialyzer warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lazedo committed Feb 25, 2017
1 parent 44bb989 commit 11536f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/jesse_error.erl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
%% throws an exeption, otherwise adds a new element to the list and returs it.
-spec default_error_handler( Error :: error_reason()
, ErrorList :: [error_reason()]
, AllowedErrors :: non_neg_integer()
, AllowedErrors :: non_neg_integer() | 'infinity'
) -> [error_reason()] | no_return().
default_error_handler(Error, ErrorList, AllowedErrors) ->
case AllowedErrors > length(ErrorList) orelse AllowedErrors =:= 'infinity' of
Expand Down
4 changes: 2 additions & 2 deletions src/jesse_state.erl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ add_to_path(State, Property) ->
State#state{current_path = [Property | CurrentPath]}.

%% @doc Getter for `allowed_errors'.
-spec get_allowed_errors(State :: state()) -> non_neg_integer().
-spec get_allowed_errors(State :: state()) -> non_neg_integer() | 'infinity'.
get_allowed_errors(#state{allowed_errors = AllowedErrors}) ->
AllowedErrors.

Expand Down Expand Up @@ -186,7 +186,7 @@ remove_last_from_path(State = #state{current_path = [_Property | Path]}) ->

%% @doc Getter for `allowed_errors'.
-spec set_allowed_errors( State :: state()
, AllowedErrors :: non_neg_integer()
, AllowedErrors :: non_neg_integer() | 'infinity'
) -> state().
set_allowed_errors(#state{} = State, AllowedErrors) ->
State#state{allowed_errors = AllowedErrors}.
Expand Down

0 comments on commit 11536f6

Please sign in to comment.