Add default keyword for specialization
This commit is contained in:
parent
5f60a3048e
commit
eea99f491b
1 changed files with 5 additions and 5 deletions
|
@ -2481,10 +2481,6 @@ impl<R: Read + SizeHint> Iterator for Bytes<R> {
|
|||
|
||||
#[stable(feature = "bufreader_size_hint", since = "1.51.0")]
|
||||
trait SizeHint {
|
||||
fn lower_bound(&self) -> usize {
|
||||
0
|
||||
}
|
||||
|
||||
fn upper_bound(&self) -> Option<usize> {
|
||||
None
|
||||
}
|
||||
|
@ -2495,7 +2491,11 @@ trait SizeHint {
|
|||
}
|
||||
|
||||
#[stable(feature = "bufreader_size_hint", since = "1.51.0")]
|
||||
impl<T> SizeHint for T {}
|
||||
impl<T> SizeHint for T {
|
||||
default fn lower_bound(&self) -> usize {
|
||||
0
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "bufreader_size_hint", since = "1.51.0")]
|
||||
impl<T> SizeHint for BufReader<T> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue