mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-26 22:05:14 +00:00
Add default keyword for specialization
This commit is contained in:
parent
5f60a3048e
commit
eea99f491b
@ -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…
Reference in New Issue
Block a user