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 @@ -2466,17 +2466,15 @@ impl<R: Read> Iterator for Bytes<R> {
2466
2466
}
2467
2467
}
2468
2468
2469
- default fn size_hint ( & self ) -> ( usize , Option < usize > ) {
2469
+ fn size_hint ( & self ) -> ( usize , Option < usize > ) {
2470
2470
( & self . inner as & dyn SizeHint ) . size_hint ( )
2471
2471
}
2472
2472
}
2473
2473
2474
2474
trait SizeHint {
2475
2475
fn lower_bound ( & self ) -> usize ;
2476
2476
2477
- fn upper_bound ( & self ) -> Option < usize > {
2478
- None
2479
- }
2477
+ fn upper_bound ( & self ) -> Option < usize > ;
2480
2478
2481
2479
fn size_hint ( & self ) -> ( usize , Option < usize > ) {
2482
2480
( self . lower_bound ( ) , self . upper_bound ( ) )
@@ -2487,6 +2485,10 @@ impl<T> SizeHint for T {
2487
2485
default fn lower_bound ( & self ) -> usize {
2488
2486
0
2489
2487
}
2488
+
2489
+ default fn upper_bound ( & self ) -> Option < usize > {
2490
+ None
2491
+ }
2490
2492
}
2491
2493
2492
2494
impl < T > SizeHint for BufReader < T > {
You can’t perform that action at this time.
0 commit comments