@@ -2,11 +2,19 @@ use crate::{BufRead, ErrorType, Read, ReadReady, Seek, Write, WriteReady};
22use alloc:: boxed:: Box ;
33
44#[ 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+ ) ]
59impl < T : ?Sized + ErrorType > ErrorType for Box < T > {
610 type Error = T :: Error ;
711}
812
913#[ 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+ ) ]
1018impl < T : ?Sized + Read > Read for Box < T > {
1119 #[ inline]
1220 fn read ( & mut self , buf : & mut [ u8 ] ) -> Result < usize , Self :: Error > {
@@ -20,6 +28,10 @@ impl<T: ?Sized + Read> Read for Box<T> {
2028}
2129
2230#[ 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+ ) ]
2335impl < T : ?Sized + BufRead > BufRead for Box < T > {
2436 fn fill_buf ( & mut self ) -> Result < & [ u8 ] , Self :: Error > {
2537 T :: fill_buf ( self )
@@ -32,6 +44,10 @@ impl<T: ?Sized + BufRead> BufRead for Box<T> {
3244}
3345
3446#[ 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+ ) ]
3551impl < T : ?Sized + Write > Write for Box < T > {
3652 #[ inline]
3753 fn write ( & mut self , buf : & [ u8 ] ) -> Result < usize , Self :: Error > {
@@ -58,6 +74,10 @@ impl<T: ?Sized + Write> Write for Box<T> {
5874}
5975
6076#[ 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+ ) ]
6181impl < T : ?Sized + Seek > Seek for Box < T > {
6282 #[ inline]
6383 fn seek ( & mut self , pos : crate :: SeekFrom ) -> Result < u64 , Self :: Error > {
@@ -81,6 +101,10 @@ impl<T: ?Sized + Seek> Seek for Box<T> {
81101}
82102
83103#[ 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+ ) ]
84108impl < T : ?Sized + ReadReady > ReadReady for Box < T > {
85109 #[ inline]
86110 fn read_ready ( & mut self ) -> Result < bool , Self :: Error > {
@@ -89,6 +113,10 @@ impl<T: ?Sized + ReadReady> ReadReady for Box<T> {
89113}
90114
91115#[ 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+ ) ]
92120impl < T : ?Sized + WriteReady > WriteReady for Box < T > {
93121 #[ inline]
94122 fn write_ready ( & mut self ) -> Result < bool , Self :: Error > {
0 commit comments