From c1b8ec27b7fe0d14e3e80bbdce478e740b6bd59e Mon Sep 17 00:00:00 2001 From: Marc-Antoine Perennou Date: Tue, 20 Aug 2024 22:23:57 +0200 Subject: [PATCH] silence warnings reported by newer rust versions --- examples/a-chat/server.rs | 1 + src/io/buf_writer.rs | 2 +- src/io/read/bytes.rs | 2 +- src/io/read/chain.rs | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/a-chat/server.rs b/examples/a-chat/server.rs index e049a490e..d3ac74699 100644 --- a/examples/a-chat/server.rs +++ b/examples/a-chat/server.rs @@ -96,6 +96,7 @@ async fn connection_writer_loop( None => break, }, void = shutdown.next().fuse() => match void { + #[allow(unreachable_patterns)] Some(void) => match void {}, None => break, } diff --git a/src/io/buf_writer.rs b/src/io/buf_writer.rs index c972937fd..230954e88 100644 --- a/src/io/buf_writer.rs +++ b/src/io/buf_writer.rs @@ -114,7 +114,7 @@ pin_project! { /// # Ok(()) }) } ///``` #[derive(Debug)] -pub struct IntoInnerError(W, crate::io::Error); +pub struct IntoInnerError(W, #[allow(dead_code)] crate::io::Error); impl BufWriter { /// Creates a new `BufWriter` with a default buffer capacity. The default is currently 8 KB, diff --git a/src/io/read/bytes.rs b/src/io/read/bytes.rs index ab9259611..fed24ac2a 100644 --- a/src/io/read/bytes.rs +++ b/src/io/read/bytes.rs @@ -32,7 +32,7 @@ impl Stream for Bytes { } } -#[cfg(all(test, default))] +#[cfg(all(test, feature = "default"))] mod tests { use crate::io; use crate::prelude::*; diff --git a/src/io/read/chain.rs b/src/io/read/chain.rs index 4fcdb0ec9..ff159cc80 100644 --- a/src/io/read/chain.rs +++ b/src/io/read/chain.rs @@ -165,7 +165,7 @@ impl BufRead for Chain { } } -#[cfg(all(test, default))] +#[cfg(all(test, feature = "default"))] mod tests { use crate::io; use crate::prelude::*;