also forward Iterator::size_hint()

This commit is contained in:
Jorge Aparicio 2015-01-20 18:15:28 -05:00
parent 74e111caf6
commit 00cddb068c
2 changed files with 8 additions and 0 deletions

View File

@ -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)]

View File

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