1
Fork 0

Remove unnecessary default keyword

This commit is contained in:
Xavientois 2021-01-15 20:45:43 -05:00
parent 93870c8d5f
commit 7869371bf1

View file

@ -2466,7 +2466,7 @@ impl<R: Read> Iterator for Bytes<R> {
}
}
default fn size_hint(&self) -> (usize, Option<usize>) {
fn size_hint(&self) -> (usize, Option<usize>) {
(&self.inner as &dyn SizeHint).size_hint()
}
}
@ -2474,9 +2474,7 @@ impl<R: Read> Iterator for Bytes<R> {
trait SizeHint {
fn lower_bound(&self) -> usize;
fn upper_bound(&self) -> Option<usize> {
None
}
fn upper_bound(&self) -> Option<usize>;
fn size_hint(&self) -> (usize, Option<usize>) {
(self.lower_bound(), self.upper_bound())
@ -2487,6 +2485,10 @@ impl<T> SizeHint for T {
default fn lower_bound(&self) -> usize {
0
}
default fn upper_bound(&self) -> Option<usize> {
None
}
}
impl<T> SizeHint for BufReader<T> {