Skip to content

Commit e7cabcd

Browse files
committed
style
1 parent 8d23b53 commit e7cabcd

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

src/jesse_state.erl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
%% Includes
5151
-include("jesse_schema_validator.hrl").
5252

53-
-type extra_validator() :: fun((jesse:json_term(), state()) -> state()) | undefined.
5453
%% Internal datastructures
5554
-record( state
5655
, { root_schema :: jesse:json_term()
@@ -75,6 +74,9 @@
7574
}
7675
).
7776

77+
-type extra_validator() :: fun((jesse:json_term(), state()) -> state())
78+
| undefined.
79+
7880
-opaque state() :: #state{}.
7981

8082
%%% API
@@ -393,4 +395,6 @@ load_schema(#state{schema_loader_fun = LoaderFun}, SchemaURI) ->
393395
?not_found
394396
end.
395397

396-
get_extra_validator(#state{extra_validator=Fun}) -> Fun.
398+
%% @private
399+
get_extra_validator(#state{extra_validator = Fun}) ->
400+
Fun.

src/jesse_validator_draft3.erl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ remove_last_from_path(State) ->
10351035

10361036
%% @private
10371037
check_external_validation(Value, State) ->
1038-
case jesse_state:get_extra_validator(State) of
1039-
undefined -> State;
1040-
Fun -> Fun(Value, State)
1041-
end.
1038+
case jesse_state:get_extra_validator(State) of
1039+
undefined -> State;
1040+
Fun -> Fun(Value, State)
1041+
end.

src/jesse_validator_draft4.erl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,7 @@ valid_datetime(DateTimeBin) ->
13651365
end.
13661366

13671367
check_external_validation(Value, State) ->
1368-
case jesse_state:get_extra_validator(State) of
1369-
undefined -> State;
1370-
Fun -> Fun(Value, State)
1371-
end.
1368+
case jesse_state:get_extra_validator(State) of
1369+
undefined -> State;
1370+
Fun -> Fun(Value, State)
1371+
end.

0 commit comments

Comments
 (0)