File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -489,6 +489,10 @@ impl<R: Seek> Seek for BufReader<R> {
489489 )
490490 } )
491491 }
492+
493+ fn stream_len ( & mut self ) -> io:: Result < u64 > {
494+ self . inner . stream_len ( )
495+ }
492496}
493497
494498impl < T > SizeHint for BufReader < T > {
Original file line number Diff line number Diff line change @@ -661,6 +661,10 @@ impl<W: Write + Seek> Seek for BufWriter<W> {
661661 self . flush_buf ( ) ?;
662662 self . get_mut ( ) . seek ( pos)
663663 }
664+
665+ fn stream_len ( & mut self ) -> io:: Result < u64 > {
666+ self . inner . stream_len ( )
667+ }
664668}
665669
666670#[ stable( feature = "rust1" , since = "1.0.0" ) ]
Original file line number Diff line number Diff line change @@ -93,6 +93,11 @@ impl<S: Seek + ?Sized> Seek for &mut S {
9393 fn stream_position ( & mut self ) -> io:: Result < u64 > {
9494 ( * * self ) . stream_position ( )
9595 }
96+
97+ #[ inline]
98+ fn stream_len ( & mut self ) -> io:: Result < u64 > {
99+ ( * * self ) . stream_len ( )
100+ }
96101}
97102#[ stable( feature = "rust1" , since = "1.0.0" ) ]
98103impl < B : BufRead + ?Sized > BufRead for & mut B {
@@ -197,6 +202,11 @@ impl<S: Seek + ?Sized> Seek for Box<S> {
197202 fn stream_position ( & mut self ) -> io:: Result < u64 > {
198203 ( * * self ) . stream_position ( )
199204 }
205+
206+ #[ inline]
207+ fn stream_len ( & mut self ) -> io:: Result < u64 > {
208+ ( * * self ) . stream_len ( )
209+ }
200210}
201211#[ stable( feature = "rust1" , since = "1.0.0" ) ]
202212impl < B : BufRead + ?Sized > BufRead for Box < B > {
You can’t perform that action at this time.
0 commit comments