diff --git a/core/lib/src/router/router.rs b/core/lib/src/router/router.rs index 148654ab9b..d0d0ab5458 100644 --- a/core/lib/src/router/router.rs +++ b/core/lib/src/router/router.rs @@ -113,7 +113,7 @@ impl Router { self.route_map.get(&req.method()) .into_iter() .flatten() - .any(|&route| + .any(|&route| paths_match(&self.routes[route], req) && queries_match(&self.routes[route], req) @@ -430,7 +430,10 @@ mod test { assert!(route(&router, Get, "/prefi/").is_none()); } - fn has_mismatched_method<'a>(router: &'a Router, method: Method, uri: &'a str) -> bool { + fn has_mismatched_method<'a>( + router: &'a Router, + method: Method, uri: &'a str + ) -> bool { let client = Client::debug_with(vec![]).expect("client"); let request = client.req(method, Origin::parse(uri).unwrap()); router.matches_except_method(&request) diff --git a/core/lib/src/server.rs b/core/lib/src/server.rs index cab142c3f4..badfb44c95 100644 --- a/core/lib/src/server.rs +++ b/core/lib/src/server.rs @@ -220,9 +220,11 @@ impl Rocket { } }); } + Ok(()) }); } + Ok(()) } }