Skip to content

Commit

Permalink
Remove unneeded macro usage (#2995)
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Sparks <b.sparks@alugha.com>
  • Loading branch information
bengsparks and Benjamin Sparks authored Oct 17, 2024
1 parent 1143694 commit c5a451d
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 12 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
2 changes: 0 additions & 2 deletions examples/serve-with-hyper/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
//!
//! [hyper-util]: https://crates.io/crates/hyper-util

#![allow(unreachable_patterns)]

use std::convert::Infallible;
use std::net::SocketAddr;

Expand Down
2 changes: 0 additions & 2 deletions examples/unix-domain-socket/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
//! ```not_rust
//! cargo run -p example-unix-domain-socket
//! ```
#![allow(unreachable_patterns)]

#[cfg(unix)]
#[tokio::main]
async fn main() {
Expand Down

0 comments on commit c5a451d

Please sign in to comment.