File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -2463,17 +2463,15 @@ impl<R: Read> Iterator for Bytes<R> {
2463
2463
}
2464
2464
}
2465
2465
2466
- default fn size_hint ( & self ) -> ( usize , Option < usize > ) {
2466
+ fn size_hint ( & self ) -> ( usize , Option < usize > ) {
2467
2467
( & self . inner as & dyn SizeHint ) . size_hint ( )
2468
2468
}
2469
2469
}
2470
2470
2471
2471
trait SizeHint {
2472
2472
fn lower_bound ( & self ) -> usize ;
2473
2473
2474
- fn upper_bound ( & self ) -> Option < usize > {
2475
- None
2476
- }
2474
+ fn upper_bound ( & self ) -> Option < usize > ;
2477
2475
2478
2476
fn size_hint ( & self ) -> ( usize , Option < usize > ) {
2479
2477
( self . lower_bound ( ) , self . upper_bound ( ) )
@@ -2484,6 +2482,10 @@ impl<T> SizeHint for T {
2484
2482
default fn lower_bound ( & self ) -> usize {
2485
2483
0
2486
2484
}
2485
+
2486
+ default fn upper_bound ( & self ) -> Option < usize > {
2487
+ None
2488
+ }
2487
2489
}
2488
2490
2489
2491
impl < T > SizeHint for BufReader < T > {
You can’t perform that action at this time.
0 commit comments