Move default to trait definition
This commit is contained in:
parent
11c49f6a2a
commit
260a270f7c
1 changed files with 4 additions and 6 deletions
|
@ -2481,7 +2481,9 @@ impl<R: Read + SizeHint> Iterator for Bytes<R> {
|
|||
|
||||
#[stable(feature = "bufreader_size_hint", since = "1.51.0")]
|
||||
trait SizeHint {
|
||||
fn lower_bound(&self) -> usize;
|
||||
fn lower_bound(&self) -> usize {
|
||||
0
|
||||
}
|
||||
|
||||
fn upper_bound(&self) -> Option<usize> {
|
||||
None
|
||||
|
@ -2493,11 +2495,7 @@ trait SizeHint {
|
|||
}
|
||||
|
||||
#[stable(feature = "bufreader_size_hint", since = "1.51.0")]
|
||||
impl<T> SizeHint for T {
|
||||
fn lower_bound(&self) -> usize {
|
||||
0
|
||||
}
|
||||
}
|
||||
impl<T> SizeHint for T;
|
||||
|
||||
#[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