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 11c49f6 commit 260a270Copy full SHA for 260a270
library/std/src/io/mod.rs
@@ -2481,7 +2481,9 @@ 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;
+ fn lower_bound(&self) -> usize {
2485
+ 0
2486
+ }
2487
2488
fn upper_bound(&self) -> Option<usize> {
2489
None
@@ -2493,11 +2495,7 @@ trait SizeHint {
2493
2495
}
2494
2496
2497
-impl<T> SizeHint for T {
- fn lower_bound(&self) -> usize {
2498
- 0
2499
- }
2500
-}
+impl<T> SizeHint for T;
2501
2502
2503
impl<T> SizeHint for BufReader<T> {
0 commit comments