mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Implement size_hint
for more iterators.
``` implement size hint for more iterators because why not we like fast things ```
This commit is contained in:
parent
cad3aff508
commit
9cd4535364
8 changed files with 36 additions and 0 deletions
|
@ -440,4 +440,12 @@ impl<I, J, K, T> Iterator for Choice3<I, J, K>
|
|||
Choice3::Third(ref mut k) => k.next(),
|
||||
}
|
||||
}
|
||||
|
||||
fn size_hint(&self) -> (usize, Option<usize>) {
|
||||
match *self {
|
||||
Choice3::First(ref i) => i.size_hint(),
|
||||
Choice3::Second(ref j) => j.size_hint(),
|
||||
Choice3::Third(ref k) => k.size_hint(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue