also forward Iterator::size_hint()
This commit is contained in:
parent
74e111caf6
commit
00cddb068c
2 changed files with 8 additions and 0 deletions
|
@ -194,6 +194,10 @@ impl<'a, T> Iterator for Box<Iterator<Item=T> + 'a> {
|
|||
fn next(&mut self) -> Option<T> {
|
||||
(**self).next()
|
||||
}
|
||||
|
||||
fn size_hint(&self) -> (usize, Option<usize>) {
|
||||
(**self).size_hint()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
@ -107,6 +107,10 @@ impl<'a, T> Iterator for &'a mut (Iterator<Item=T> + 'a) {
|
|||
fn next(&mut self) -> Option<T> {
|
||||
(**self).next()
|
||||
}
|
||||
|
||||
fn size_hint(&self) -> (usize, Option<usize>) {
|
||||
(**self).size_hint()
|
||||
}
|
||||
}
|
||||
|
||||
/// Conversion from an `Iterator`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue