diff options
author | Loïc Hoguin <[email protected]> | 2011-04-18 12:20:52 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2011-04-18 12:20:52 +0200 |
commit | 6712eaa5c8196dc1ba179257d050b131959c2a1b (patch) | |
tree | 5b56dcc92665b0aaee94bc78e681c199f7ff8c3d /src | |
parent | ef2673b61eb640768c8e83c5c6847b50255b07a6 (diff) | |
download | cowboy-6712eaa5c8196dc1ba179257d050b131959c2a1b.tar.gz cowboy-6712eaa5c8196dc1ba179257d050b131959c2a1b.tar.bz2 cowboy-6712eaa5c8196dc1ba179257d050b131959c2a1b.zip |
Rename match() into match_rule().
Diffstat (limited to 'src')
-rw-r--r-- | src/cowboy_dispatcher.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cowboy_dispatcher.erl b/src/cowboy_dispatcher.erl index 366aab8..46cf717 100644 --- a/src/cowboy_dispatcher.erl +++ b/src/cowboy_dispatcher.erl @@ -55,7 +55,7 @@ match(Host, Path, [{HostMatch, PathMatchs}|Tail]) -> match_path(Path, PathMatchs, HostBinds) end. --spec match_path(Path::path_tokens(), list({Path::match(), +-spec match_path(Path::path_tokens(), list({Path::match_rule(), Handler::module(), Opts::term()}), HostBinds::bindings()) -> {ok, Handler::module(), Opts::term(), Binds::bindings()} | {error, notfound, path}. @@ -75,7 +75,7 @@ match_path(Path, [{PathMatch, Handler, Opts}|Tail], HostBinds) -> %% Internal. --spec try_match(Type::host | path, List::path_tokens(), Match::match()) +-spec try_match(Type::host | path, List::path_tokens(), Match::match_rule()) -> {true, Binds::bindings()} | false. try_match(_Type, _List, '_') -> {true, []}; @@ -86,7 +86,7 @@ try_match(host, List, Match) -> try_match(path, List, Match) -> list_match(List, Match, []). --spec list_match(List::path_tokens(), Match::match(), Binds::bindings()) +-spec list_match(List::path_tokens(), Match::match_rule(), Binds::bindings()) -> {true, Binds::bindings()} | false. %% Atom '_' matches anything, continue. list_match([_E|Tail], ['_'|TailMatch], Binds) -> |