mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-24 05:33:41 +00:00
also forward Iterator::size_hint()
This commit is contained in:
parent
74e111caf6
commit
00cddb068c
@ -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…
Reference in New Issue
Block a user