From f13eab893a3dfe056f5aad85aa604666448405c4 Mon Sep 17 00:00:00 2001 From: zys864 <616561164@qq.com> Date: Fri, 8 Apr 2022 20:28:11 +0800 Subject: [PATCH] fix `route` module clippy warnings (#920) Co-authored-by: zys864 --- axum/src/routing/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/axum/src/routing/mod.rs b/axum/src/routing/mod.rs index 0a00c22b..81a02700 100644 --- a/axum/src/routing/mod.rs +++ b/axum/src/routing/mod.rs @@ -498,10 +498,10 @@ where match self.node.at(&path) { Ok(match_) => self.call_route(match_, req), Err(MatchError::MissingTrailingSlash) => RouteFuture::from_response( - Redirect::permanent(&format!("{}/", req.uri().to_string())).into_response(), + Redirect::permanent(&format!("{}/", req.uri())).into_response(), ), Err(MatchError::ExtraTrailingSlash) => RouteFuture::from_response( - Redirect::permanent(&req.uri().to_string().strip_suffix('/').unwrap()) + Redirect::permanent(req.uri().to_string().strip_suffix('/').unwrap()) .into_response(), ), Err(MatchError::NotFound) => match &self.fallback {