mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-08 00:00:24 +02:00
Remove needless borrow (#961)
This commit is contained in:
@@ -505,7 +505,7 @@ where
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
Err(MatchError::ExtraTrailingSlash) => {
|
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(
|
RouteFuture::from_response(
|
||||||
Redirect::permanent(&new_uri.to_string()).into_response(),
|
Redirect::permanent(&new_uri.to_string()).into_response(),
|
||||||
|
|||||||
Reference in New Issue
Block a user