Skip to content

Commit 5c427c0

Browse files
committed
Add default keyword for specialization
1 parent f28dd81 commit 5c427c0

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
@@ -2478,10 +2478,6 @@ impl<R: Read + SizeHint> Iterator for Bytes<R> {
24782478

24792479
#[stable(feature = "bufreader_size_hint", since = "1.51.0")]
24802480
trait SizeHint {
2481-
fn lower_bound(&self) -> usize {
2482-
0
2483-
}
2484-
24852481
fn upper_bound(&self) -> Option<usize> {
24862482
None
24872483
}
@@ -2492,7 +2488,11 @@ trait SizeHint {
24922488
}
24932489

24942490
#[stable(feature = "bufreader_size_hint", since = "1.51.0")]
2495-
impl<T> SizeHint for T {}
2491+
impl<T> SizeHint for T {
2492+
default fn lower_bound(&self) -> usize {
2493+
0
2494+
}
2495+
}
24962496

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

0 commit comments

Comments
 (0)