From 3b43a03baccd8af66ad1318e5dde63e774740862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesper=20Steen=20M=C3=B8ller?= Date: Thu, 5 Sep 2024 21:09:36 +0200 Subject: [PATCH] Style corrections --- core/lib/src/router/router.rs | 7 +++++-- core/lib/src/server.rs | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) 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(()) } }