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