Remove unnecessary default keyword
This commit is contained in:
parent
93870c8d5f
commit
7869371bf1
1 changed files with 6 additions and 4 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue