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 edcd2ba commit 3358674Copy full SHA for 3358674
library/std/src/io/mod.rs
@@ -2478,7 +2478,9 @@ 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;
+ fn lower_bound(&self) -> usize {
2482
+ 0
2483
+ }
2484
2485
fn upper_bound(&self) -> Option<usize> {
2486
None
@@ -2490,11 +2492,7 @@ trait SizeHint {
2490
2492
}
2491
2493
2494
-impl<T> SizeHint for T {
- fn lower_bound(&self) -> usize {
2495
- 0
2496
- }
2497
-}
+impl<T> SizeHint for T;
2498
2499
2500
impl<T> SizeHint for BufReader<T> {
0 commit comments