@@ -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 > {
@@ -15,6 +23,10 @@ impl<T: ?Sized + Read> Read for Box<T> {
1523}
1624
1725#[ 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+ ) ]
1830impl < T : ?Sized + BufRead > BufRead for Box < T > {
1931 fn fill_buf ( & mut self ) -> Result < & [ u8 ] , Self :: Error > {
2032 T :: fill_buf ( self )
@@ -26,6 +38,10 @@ impl<T: ?Sized + BufRead> BufRead for Box<T> {
2638}
2739
2840#[ 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+ ) ]
2945impl < T : ?Sized + Write > Write for Box < T > {
3046 #[ inline]
3147 fn write ( & mut self , buf : & [ u8 ] ) -> Result < usize , Self :: Error > {
@@ -39,6 +55,10 @@ impl<T: ?Sized + Write> Write for Box<T> {
3955}
4056
4157#[ 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+ ) ]
4262impl < T : ?Sized + Seek > Seek for Box < T > {
4363 #[ inline]
4464 fn seek ( & mut self , pos : crate :: SeekFrom ) -> Result < u64 , Self :: Error > {
@@ -47,6 +67,10 @@ impl<T: ?Sized + Seek> Seek for Box<T> {
4767}
4868
4969#[ 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+ ) ]
5074impl < T : ?Sized + ReadReady > ReadReady for Box < T > {
5175 #[ inline]
5276 fn read_ready ( & mut self ) -> Result < bool , Self :: Error > {
@@ -55,6 +79,10 @@ impl<T: ?Sized + ReadReady> ReadReady for Box<T> {
5579}
5680
5781#[ 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+ ) ]
5886impl < T : ?Sized + WriteReady > WriteReady for Box < T > {
5987 #[ inline]
6088 fn write_ready ( & mut self ) -> Result < bool , Self :: Error > {
0 commit comments