Skip to content

Commit

Permalink
axum: remove silencing of unreachable patterns that no longer trigger
Browse files Browse the repository at this point in the history
Backport to beta occurred in rust-lang/rust#129103
and stable never implemented this warning
  • Loading branch information
Benjamin Sparks committed Oct 17, 2024
1 parent 65ad603 commit fb4fa95
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions axum/src/handler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,6 @@ where
) -> _,
> = svc.oneshot(req).map(|result| match result {
Ok(res) => res.into_response(),

#[allow(unreachable_patterns)]
Err(err) => match err {},
});

Expand Down
2 changes: 0 additions & 2 deletions axum/src/middleware/from_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,6 @@ impl Next {
pub async fn run(mut self, req: Request) -> Response {
match self.inner.call(req).await {
Ok(res) => res,

#[allow(unreachable_patterns)]
Err(err) => match err {},
}
}
Expand Down
2 changes: 0 additions & 2 deletions axum/src/middleware/map_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@ macro_rules! impl_service {
Ok(res) => {
f($($ty,)* res).await.into_response()
}

#[allow(unreachable_patterns)]
Err(err) => match err {}
}
});
Expand Down
2 changes: 0 additions & 2 deletions axum/src/routing/route.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,6 @@ impl Future for InfallibleRouteFuture {
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
match futures_util::ready!(self.project().future.poll(cx)) {
Ok(response) => Poll::Ready(response),

#[allow(unreachable_patterns)]
Err(err) => match err {},
}
}
Expand Down

0 comments on commit fb4fa95

Please sign in to comment.