Skip to content

Commit c617356

Browse files
committed
io: reduce noise using module-level clippy deny
1 parent 5cfbff9 commit c617356

File tree

2 files changed

+8
-44
lines changed

2 files changed

+8
-44
lines changed

embedded-io-async/src/impls/boxx.rs

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
use crate::{BufRead, Read, Seek, SeekFrom, Write};
2-
use alloc::boxed::Box;
3-
4-
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
51
#[deny(
62
clippy::missing_trait_methods,
73
reason = "Methods should be forwarded to the underlying type"
84
)]
5+
use crate::{BufRead, Read, Seek, SeekFrom, Write};
6+
use alloc::boxed::Box;
7+
8+
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
99
impl<T: ?Sized + Read> Read for Box<T> {
1010
#[inline]
1111
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
@@ -14,10 +14,6 @@ impl<T: ?Sized + Read> Read for Box<T> {
1414
}
1515

1616
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
17-
#[deny(
18-
clippy::missing_trait_methods,
19-
reason = "Methods should be forwarded to the underlying type"
20-
)]
2117
impl<T: ?Sized + BufRead> BufRead for Box<T> {
2218
#[inline]
2319
async fn fill_buf(&mut self) -> Result<&[u8], Self::Error> {
@@ -31,10 +27,6 @@ impl<T: ?Sized + BufRead> BufRead for Box<T> {
3127
}
3228

3329
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
34-
#[deny(
35-
clippy::missing_trait_methods,
36-
reason = "Methods should be forwarded to the underlying type"
37-
)]
3830
impl<T: ?Sized + Write> Write for Box<T> {
3931
#[inline]
4032
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
@@ -48,10 +40,6 @@ impl<T: ?Sized + Write> Write for Box<T> {
4840
}
4941

5042
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
51-
#[deny(
52-
clippy::missing_trait_methods,
53-
reason = "Methods should be forwarded to the underlying type"
54-
)]
5543
impl<T: ?Sized + Seek> Seek for Box<T> {
5644
#[inline]
5745
async fn seek(&mut self, pos: SeekFrom) -> Result<u64, Self::Error> {

embedded-io/src/impls/boxx.rs

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
use crate::{BufRead, ErrorType, Read, ReadReady, Seek, Write, WriteReady};
2-
use alloc::boxed::Box;
3-
4-
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
51
#[deny(
62
clippy::missing_trait_methods,
73
reason = "Methods should be forwarded to the underlying type"
84
)]
5+
use crate::{BufRead, ErrorType, Read, ReadReady, Seek, Write, WriteReady};
6+
use alloc::boxed::Box;
7+
8+
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
99
impl<T: ?Sized + ErrorType> ErrorType for Box<T> {
1010
type Error = T::Error;
1111
}
1212

1313
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
14-
#[deny(
15-
clippy::missing_trait_methods,
16-
reason = "Methods should be forwarded to the underlying type"
17-
)]
1814
impl<T: ?Sized + Read> Read for Box<T> {
1915
#[inline]
2016
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
@@ -23,10 +19,6 @@ impl<T: ?Sized + Read> Read for Box<T> {
2319
}
2420

2521
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
26-
#[deny(
27-
clippy::missing_trait_methods,
28-
reason = "Methods should be forwarded to the underlying type"
29-
)]
3022
impl<T: ?Sized + BufRead> BufRead for Box<T> {
3123
fn fill_buf(&mut self) -> Result<&[u8], Self::Error> {
3224
T::fill_buf(self)
@@ -38,10 +30,6 @@ impl<T: ?Sized + BufRead> BufRead for Box<T> {
3830
}
3931

4032
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
41-
#[deny(
42-
clippy::missing_trait_methods,
43-
reason = "Methods should be forwarded to the underlying type"
44-
)]
4533
impl<T: ?Sized + Write> Write for Box<T> {
4634
#[inline]
4735
fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
@@ -55,10 +43,6 @@ impl<T: ?Sized + Write> Write for Box<T> {
5543
}
5644

5745
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
58-
#[deny(
59-
clippy::missing_trait_methods,
60-
reason = "Methods should be forwarded to the underlying type"
61-
)]
6246
impl<T: ?Sized + Seek> Seek for Box<T> {
6347
#[inline]
6448
fn seek(&mut self, pos: crate::SeekFrom) -> Result<u64, Self::Error> {
@@ -67,10 +51,6 @@ impl<T: ?Sized + Seek> Seek for Box<T> {
6751
}
6852

6953
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
70-
#[deny(
71-
clippy::missing_trait_methods,
72-
reason = "Methods should be forwarded to the underlying type"
73-
)]
7454
impl<T: ?Sized + ReadReady> ReadReady for Box<T> {
7555
#[inline]
7656
fn read_ready(&mut self) -> Result<bool, Self::Error> {
@@ -79,10 +59,6 @@ impl<T: ?Sized + ReadReady> ReadReady for Box<T> {
7959
}
8060

8161
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", feature = "alloc"))))]
82-
#[deny(
83-
clippy::missing_trait_methods,
84-
reason = "Methods should be forwarded to the underlying type"
85-
)]
8662
impl<T: ?Sized + WriteReady> WriteReady for Box<T> {
8763
#[inline]
8864
fn write_ready(&mut self) -> Result<bool, Self::Error> {

0 commit comments

Comments
 (0)