Skip to content

Commit eea99f4

Browse files
committed
Add default keyword for specialization
1 parent 5f60a30 commit eea99f4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

library/std/src/io/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2481,10 +2481,6 @@ impl<R: Read + SizeHint> Iterator for Bytes<R> {
24812481

24822482
#[stable(feature = "bufreader_size_hint", since = "1.51.0")]
24832483
trait SizeHint {
2484-
fn lower_bound(&self) -> usize {
2485-
0
2486-
}
2487-
24882484
fn upper_bound(&self) -> Option<usize> {
24892485
None
24902486
}
@@ -2495,7 +2491,11 @@ trait SizeHint {
24952491
}
24962492

24972493
#[stable(feature = "bufreader_size_hint", since = "1.51.0")]
2498-
impl<T> SizeHint for T {}
2494+
impl<T> SizeHint for T {
2495+
default fn lower_bound(&self) -> usize {
2496+
0
2497+
}
2498+
}
24992499

25002500
#[stable(feature = "bufreader_size_hint", since = "1.51.0")]
25012501
impl<T> SizeHint for BufReader<T> {

0 commit comments

Comments
 (0)