Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unneeded #[allow] attributes #2995

Merged
merged 2 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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