Skip to content

Commit c5a451d

Browse files
authored
Remove unneeded macro usage (#2995)
Co-authored-by: Benjamin Sparks <b.sparks@alugha.com>
1 parent 1143694 commit c5a451d

File tree

6 files changed

+0
-12
lines changed

6 files changed

+0
-12
lines changed

axum/src/handler/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,6 @@ where
328328
) -> _,
329329
> = svc.oneshot(req).map(|result| match result {
330330
Ok(res) => res.into_response(),
331-
332-
#[allow(unreachable_patterns)]
333331
Err(err) => match err {},
334332
});
335333

axum/src/middleware/from_fn.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,6 @@ impl Next {
345345
pub async fn run(mut self, req: Request) -> Response {
346346
match self.inner.call(req).await {
347347
Ok(res) => res,
348-
349-
#[allow(unreachable_patterns)]
350348
Err(err) => match err {},
351349
}
352350
}

axum/src/middleware/map_response.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,6 @@ macro_rules! impl_service {
278278
Ok(res) => {
279279
f($($ty,)* res).await.into_response()
280280
}
281-
282-
#[allow(unreachable_patterns)]
283281
Err(err) => match err {}
284282
}
285283
});

axum/src/routing/route.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,6 @@ impl Future for InfallibleRouteFuture {
230230
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
231231
match futures_util::ready!(self.project().future.poll(cx)) {
232232
Ok(response) => Poll::Ready(response),
233-
234-
#[allow(unreachable_patterns)]
235233
Err(err) => match err {},
236234
}
237235
}

examples/serve-with-hyper/src/main.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
//!
1212
//! [hyper-util]: https://crates.io/crates/hyper-util
1313
14-
#![allow(unreachable_patterns)]
15-
1614
use std::convert::Infallible;
1715
use std::net::SocketAddr;
1816

examples/unix-domain-socket/src/main.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
//! ```not_rust
44
//! cargo run -p example-unix-domain-socket
55
//! ```
6-
#![allow(unreachable_patterns)]
7-
86
#[cfg(unix)]
97
#[tokio::main]
108
async fn main() {

0 commit comments

Comments
 (0)