From bee5ca852b1a8e1506872aeea57f6c745c8add77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 3 Oct 2014 18:25:29 +0300 Subject: Replace some /binary to /bits in binary pattern matching We don't need the extra check for multiple of 8 bits. --- src/cowboy_static.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/cowboy_static.erl') 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]. -- cgit v1.2.3