@@ -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 > {
@@ -20,6 +28,10 @@ impl<T: ?Sized + Read> Read for Box<T> {
20
28
}
21
29
22
30
#[ cfg_attr( docsrs, doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
31
+ #[ deny(
32
+ clippy:: missing_trait_methods,
33
+ reason = "Methods should be forwarded to the underlying type"
34
+ ) ]
23
35
impl < T : ?Sized + BufRead > BufRead for Box < T > {
24
36
fn fill_buf ( & mut self ) -> Result < & [ u8 ] , Self :: Error > {
25
37
T :: fill_buf ( self )
@@ -32,6 +44,10 @@ impl<T: ?Sized + BufRead> BufRead for Box<T> {
32
44
}
33
45
34
46
#[ cfg_attr( docsrs, doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
47
+ #[ deny(
48
+ clippy:: missing_trait_methods,
49
+ reason = "Methods should be forwarded to the underlying type"
50
+ ) ]
35
51
impl < T : ?Sized + Write > Write for Box < T > {
36
52
#[ inline]
37
53
fn write ( & mut self , buf : & [ u8 ] ) -> Result < usize , Self :: Error > {
@@ -58,6 +74,10 @@ impl<T: ?Sized + Write> Write for Box<T> {
58
74
}
59
75
60
76
#[ cfg_attr( docsrs, doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
77
+ #[ deny(
78
+ clippy:: missing_trait_methods,
79
+ reason = "Methods should be forwarded to the underlying type"
80
+ ) ]
61
81
impl < T : ?Sized + Seek > Seek for Box < T > {
62
82
#[ inline]
63
83
fn seek ( & mut self , pos : crate :: SeekFrom ) -> Result < u64 , Self :: Error > {
@@ -81,6 +101,10 @@ impl<T: ?Sized + Seek> Seek for Box<T> {
81
101
}
82
102
83
103
#[ cfg_attr( docsrs, doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
104
+ #[ deny(
105
+ clippy:: missing_trait_methods,
106
+ reason = "Methods should be forwarded to the underlying type"
107
+ ) ]
84
108
impl < T : ?Sized + ReadReady > ReadReady for Box < T > {
85
109
#[ inline]
86
110
fn read_ready ( & mut self ) -> Result < bool , Self :: Error > {
@@ -89,6 +113,10 @@ impl<T: ?Sized + ReadReady> ReadReady for Box<T> {
89
113
}
90
114
91
115
#[ cfg_attr( docsrs, doc( cfg( any( feature = "std" , feature = "alloc" ) ) ) ) ]
116
+ #[ deny(
117
+ clippy:: missing_trait_methods,
118
+ reason = "Methods should be forwarded to the underlying type"
119
+ ) ]
92
120
impl < T : ?Sized + WriteReady > WriteReady for Box < T > {
93
121
#[ inline]
94
122
fn write_ready ( & mut self ) -> Result < bool , Self :: Error > {
0 commit comments