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
2 people authored and jplatte committed Nov 14, 2024
1 parent 1858043 commit b30cdcf
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 @@ -341,8 +341,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 @@ -250,8 +250,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 b30cdcf

Please sign in to comment.