aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-09-04 14:33:44 +0200
committerLoïc Hoguin <[email protected]>2017-09-04 14:33:44 +0200
commit58e9e76814a8291894ba01ac8a4551e4f8d480b3 (patch)
tree58145af48e5c9dbcec51ffec14bb9faea25c6b24 /src
parent47aa0097ed3f63bf0de1b540a6a8d4086e3d2ea6 (diff)
downloadcowboy-58e9e76814a8291894ba01ac8a4551e4f8d480b3.tar.gz
cowboy-58e9e76814a8291894ba01ac8a4551e4f8d480b3.tar.bz2
cowboy-58e9e76814a8291894ba01ac8a4551e4f8d480b3.zip
Fix more documentation todos
I have decided not to include a manual page for cowboy_stream_h at this point because it clashes with the cowboy_stream manual page. This decision will be revisited in the future.
Diffstat (limited to 'src')
-rw-r--r--src/cowboy_constraints.erl6
-rw-r--r--src/cowboy_handler.erl2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/cowboy_constraints.erl b/src/cowboy_constraints.erl
index 6b468fe..6509c4b 100644
--- a/src/cowboy_constraints.erl
+++ b/src/cowboy_constraints.erl
@@ -78,11 +78,11 @@ int(format_error, {not_an_integer, Value}) ->
io_lib:format("The value ~p is not an integer.", [Value]).
nonempty(Type, <<>>) when Type =/= format_error ->
- {error, not_empty};
+ {error, empty};
nonempty(Type, Value) when Type =/= format_error, is_binary(Value) ->
{ok, Value};
-nonempty(format_error, {not_empty, Value}) ->
- io_lib:format("The value ~p is not empty.", [Value]).
+nonempty(format_error, {empty, Value}) ->
+ io_lib:format("The value ~p is empty.", [Value]).
-ifdef(TEST).
diff --git a/src/cowboy_handler.erl b/src/cowboy_handler.erl
index 3249f76..3d509b6 100644
--- a/src/cowboy_handler.erl
+++ b/src/cowboy_handler.erl
@@ -28,7 +28,7 @@
| {module(), Req, any(), any()}
when Req::cowboy_req:req().
--callback terminate(any(), cowboy_req:req(), any()) -> ok.
+-callback terminate(any(), map(), any()) -> ok.
-optional_callbacks([terminate/3]).
-spec execute(Req, Env) -> {ok, Req, Env}