File tree 3 files changed +18
-0
lines changed
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> {
489
489
)
490
490
} )
491
491
}
492
+
493
+ fn stream_len ( & mut self ) -> io:: Result < u64 > {
494
+ self . inner . stream_len ( )
495
+ }
492
496
}
493
497
494
498
impl < 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> {
661
661
self . flush_buf ( ) ?;
662
662
self . get_mut ( ) . seek ( pos)
663
663
}
664
+
665
+ fn stream_len ( & mut self ) -> io:: Result < u64 > {
666
+ self . inner . stream_len ( )
667
+ }
664
668
}
665
669
666
670
#[ 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 {
93
93
fn stream_position ( & mut self ) -> io:: Result < u64 > {
94
94
( * * self ) . stream_position ( )
95
95
}
96
+
97
+ #[ inline]
98
+ fn stream_len ( & mut self ) -> io:: Result < u64 > {
99
+ ( * * self ) . stream_len ( )
100
+ }
96
101
}
97
102
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
98
103
impl < B : BufRead + ?Sized > BufRead for & mut B {
@@ -197,6 +202,11 @@ impl<S: Seek + ?Sized> Seek for Box<S> {
197
202
fn stream_position ( & mut self ) -> io:: Result < u64 > {
198
203
( * * self ) . stream_position ( )
199
204
}
205
+
206
+ #[ inline]
207
+ fn stream_len ( & mut self ) -> io:: Result < u64 > {
208
+ ( * * self ) . stream_len ( )
209
+ }
200
210
}
201
211
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
202
212
impl < B : BufRead + ?Sized > BufRead for Box < B > {
You can’t perform that action at this time.
0 commit comments