Skip to content

Commit

Permalink
fix route module clippy warnings (#920)
Browse files Browse the repository at this point in the history
Co-authored-by: zys864 <zys864@gmail.com>
  • Loading branch information
zys864 and zys864 committed Apr 8, 2022
1 parent a237edb commit f13eab8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions axum/src/routing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f13eab8

Please sign in to comment.