mirror of
https://github.com/tokio-rs/axum.git
synced 2025-09-29 05:50:49 +00:00
fix route
module clippy warnings (#920)
Co-authored-by: zys864 <zys864@gmail.com>
This commit is contained in:
parent
a237edb7c3
commit
f13eab893a
@ -498,10 +498,10 @@ where
|
|||||||
match self.node.at(&path) {
|
match self.node.at(&path) {
|
||||||
Ok(match_) => self.call_route(match_, req),
|
Ok(match_) => self.call_route(match_, req),
|
||||||
Err(MatchError::MissingTrailingSlash) => RouteFuture::from_response(
|
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(
|
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(),
|
.into_response(),
|
||||||
),
|
),
|
||||||
Err(MatchError::NotFound) => match &self.fallback {
|
Err(MatchError::NotFound) => match &self.fallback {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user