@@ -2,11 +2,19 @@ use crate::{BufRead, ErrorType, Read, ReadReady, Seek, Write, WriteReady};
2
2
use alloc:: boxed:: Box ;
3
3
4
4
#[ cfg_attr( docsrs, doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
5
+ #[ deny(
6
+ clippy:: missing_trait_methods,
7
+ reason = "Methods should be forwarded to the underlying type"
8
+ ) ]
5
9
impl < T : ?Sized + ErrorType > ErrorType for Box < T > {
6
10
type Error = T :: Error ;
7
11
}
8
12
9
13
#[ 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
+ ) ]
10
18
impl < T : ?Sized + Read > Read for Box < T > {
11
19
#[ inline]
12
20
fn read ( & mut self , buf : & mut [ u8 ] ) -> Result < usize , Self :: Error > {
@@ -15,6 +23,10 @@ impl<T: ?Sized + Read> Read for Box<T> {
15
23
}
16
24
17
25
#[ 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
+ ) ]
18
30
impl < T : ?Sized + BufRead > BufRead for Box < T > {
19
31
fn fill_buf ( & mut self ) -> Result < & [ u8 ] , Self :: Error > {
20
32
T :: fill_buf ( self )
@@ -26,6 +38,10 @@ impl<T: ?Sized + BufRead> BufRead for Box<T> {
26
38
}
27
39
28
40
#[ 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
+ ) ]
29
45
impl < T : ?Sized + Write > Write for Box < T > {
30
46
#[ inline]
31
47
fn write ( & mut self , buf : & [ u8 ] ) -> Result < usize , Self :: Error > {
@@ -39,6 +55,10 @@ impl<T: ?Sized + Write> Write for Box<T> {
39
55
}
40
56
41
57
#[ 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
+ ) ]
42
62
impl < T : ?Sized + Seek > Seek for Box < T > {
43
63
#[ inline]
44
64
fn seek ( & mut self , pos : crate :: SeekFrom ) -> Result < u64 , Self :: Error > {
@@ -47,6 +67,10 @@ impl<T: ?Sized + Seek> Seek for Box<T> {
47
67
}
48
68
49
69
#[ 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
+ ) ]
50
74
impl < T : ?Sized + ReadReady > ReadReady for Box < T > {
51
75
#[ inline]
52
76
fn read_ready ( & mut self ) -> Result < bool , Self :: Error > {
@@ -55,6 +79,10 @@ impl<T: ?Sized + ReadReady> ReadReady for Box<T> {
55
79
}
56
80
57
81
#[ 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
+ ) ]
58
86
impl < T : ?Sized + WriteReady > WriteReady for Box < T > {
59
87
#[ inline]
60
88
fn write_ready ( & mut self ) -> Result < bool , Self :: Error > {
0 commit comments