mirror of
https://github.com/tokio-rs/axum.git
synced 2024-11-22 15:17:18 +01:00
Remove needless borrow (#961)
This commit is contained in:
parent
c1b51b5f6e
commit
0d2c61c472
1 changed files with 1 additions and 1 deletions
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue