Remove needless borrow (#961)

This commit is contained in:
takumi 2022-04-24 16:03:54 +08:00 committed by GitHub
parent c1b51b5f6e
commit 0d2c61c472
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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(),