0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Replace some /binary to /bits in binary pattern matching

We don't need the extra check for multiple of 8 bits.
This commit is contained in:
Loïc Hoguin 2014-10-03 18:25:29 +03:00
parent 8e17d492b3
commit bee5ca852b
5 changed files with 28 additions and 28 deletions

View file

@ -134,7 +134,7 @@ good_path_check_test_() ->
],
[{P, fun() ->
case fullpath(P) of
<< "/home/cowboy/", _/binary >> -> ok
<< "/home/cowboy/", _/bits >> -> ok
end
end} || P <- Tests].
@ -145,7 +145,7 @@ bad_path_check_test_() ->
],
[{P, fun() ->
error = case fullpath(P) of
<< "/home/cowboy/", _/binary >> -> ok;
<< "/home/cowboy/", _/bits >> -> ok;
_ -> error
end
end} || P <- Tests].
@ -167,7 +167,7 @@ good_path_win32_check_test_() ->
end,
[{P, fun() ->
case fullpath(P) of
<< "c:/home/cowboy/", _/binary >> -> ok
<< "c:/home/cowboy/", _/bits >> -> ok
end
end} || P <- Tests].
@ -185,7 +185,7 @@ bad_path_win32_check_test_() ->
end,
[{P, fun() ->
error = case fullpath(P) of
<< "c:/home/cowboy/", _/binary >> -> ok;
<< "c:/home/cowboy/", _/bits >> -> ok;
_ -> error
end
end} || P <- Tests].