1
Fork 0

Move default to trait definition

This commit is contained in:
Xavientois 2021-01-15 17:47:25 -05:00
parent 11c49f6a2a
commit 260a270f7c

View file

@ -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> {