From 0d2c61c4720d901b51a2bea396fa38eba0e49b47 Mon Sep 17 00:00:00 2001 From: takumi Date: Sun, 24 Apr 2022 16:03:54 +0800 Subject: [PATCH] Remove needless borrow (#961) --- axum/src/routing/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/axum/src/routing/mod.rs b/axum/src/routing/mod.rs index 581e9241..a44bb3d1 100644 --- a/axum/src/routing/mod.rs +++ b/axum/src/routing/mod.rs @@ -505,7 +505,7 @@ where ) } Err(MatchError::ExtraTrailingSlash) => { - let new_uri = replace_trailing_slash(req.uri(), &path.strip_suffix('/').unwrap()); + let new_uri = replace_trailing_slash(req.uri(), path.strip_suffix('/').unwrap()); RouteFuture::from_response( Redirect::permanent(&new_uri.to_string()).into_response(),