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 5f60a30 commit eea99f4Copy full SHA for eea99f4
library/std/src/io/mod.rs
@@ -2481,10 +2481,6 @@ impl<R: Read + SizeHint> Iterator for Bytes<R> {
2481
2482
#[stable(feature = "bufreader_size_hint", since = "1.51.0")]
2483
trait SizeHint {
2484
- fn lower_bound(&self) -> usize {
2485
- 0
2486
- }
2487
-
2488
fn upper_bound(&self) -> Option<usize> {
2489
None
2490
}
@@ -2495,7 +2491,11 @@ trait SizeHint {
2495
2491
2496
2492
2497
2493
2498
-impl<T> SizeHint for T {}
2494
+impl<T> SizeHint for T {
+ default fn lower_bound(&self) -> usize {
+ 0
+ }
+}
2499
2500
2501
impl<T> SizeHint for BufReader<T> {
0 commit comments