diff options
author | Loïc Hoguin <[email protected]> | 2014-10-03 18:25:29 +0300 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2014-10-03 18:25:29 +0300 |
commit | bee5ca852b1a8e1506872aeea57f6c745c8add77 (patch) | |
tree | 00f65257b5ba7e4688dceb46ecce99f2f5f898a6 /src/cowboy_static.erl | |
parent | 8e17d492b377cbf2eaf0d191b1e8636ea06c806a (diff) | |
download | cowboy-bee5ca852b1a8e1506872aeea57f6c745c8add77.tar.gz cowboy-bee5ca852b1a8e1506872aeea57f6c745c8add77.tar.bz2 cowboy-bee5ca852b1a8e1506872aeea57f6c745c8add77.zip |
Replace some /binary to /bits in binary pattern matching
We don't need the extra check for multiple of 8 bits.
Diffstat (limited to 'src/cowboy_static.erl')
-rw-r--r-- | src/cowboy_static.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cowboy_static.erl b/src/cowboy_static.erl index 99ad82e..b2a8302 100644 --- a/src/cowboy_static.erl +++ b/src/cowboy_static.erl @@ -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]. |