We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f28dd81 commit 5c427c0Copy full SHA for 5c427c0
library/std/src/io/mod.rs
@@ -2478,10 +2478,6 @@ impl<R: Read + SizeHint> Iterator for Bytes<R> {
2478
2479
#[stable(feature = "bufreader_size_hint", since = "1.51.0")]
2480
trait SizeHint {
2481
- fn lower_bound(&self) -> usize {
2482
- 0
2483
- }
2484
-
2485
fn upper_bound(&self) -> Option<usize> {
2486
None
2487
}
@@ -2492,7 +2488,11 @@ trait SizeHint {
2492
2488
2493
2489
2494
2490
2495
-impl<T> SizeHint for T {}
2491
+impl<T> SizeHint for T {
+ default fn lower_bound(&self) -> usize {
+ 0
+ }
+}
2496
2497
2498
impl<T> SizeHint for BufReader<T> {
0 commit comments