Skip to content

Commit 00cddb0

Browse files
author
Jorge Aparicio
committed
also forward Iterator::size_hint()
1 parent 74e111c commit 00cddb0

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/liballoc/boxed.rs

+4
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ impl<'a, T> Iterator for Box<Iterator<Item=T> + 'a> {
194194
fn next(&mut self) -> Option<T> {
195195
(**self).next()
196196
}
197+
198+
fn size_hint(&self) -> (usize, Option<usize>) {
199+
(**self).size_hint()
200+
}
197201
}
198202

199203
#[cfg(test)]

src/libcore/iter.rs

+4
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ impl<'a, T> Iterator for &'a mut (Iterator<Item=T> + 'a) {
107107
fn next(&mut self) -> Option<T> {
108108
(**self).next()
109109
}
110+
111+
fn size_hint(&self) -> (usize, Option<usize>) {
112+
(**self).size_hint()
113+
}
110114
}
111115

112116
/// Conversion from an `Iterator`

0 commit comments

Comments
 (0)