From 765bc9064f9b38ae227a2c61a8ed34f67f0afd0f Mon Sep 17 00:00:00 2001 From: Palmer Cox Date: Wed, 11 Dec 2013 21:37:45 -0500 Subject: [PATCH] Implement size_hint() for ByRef iterator --- src/libstd/iter.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libstd/iter.rs b/src/libstd/iter.rs index 5fbb09eadcb..f16e9b53929 100644 --- a/src/libstd/iter.rs +++ b/src/libstd/iter.rs @@ -795,7 +795,8 @@ pub struct ByRef<'a, T> { impl<'a, A, T: Iterator> Iterator for ByRef<'a, T> { #[inline] fn next(&mut self) -> Option { self.iter.next() } - // FIXME: #9629 we cannot implement &self methods like size_hint on ByRef + #[inline] + fn size_hint(&self) -> (uint, Option) { self.iter.size_hint() } } impl<'a, A, T: DoubleEndedIterator> DoubleEndedIterator for ByRef<'a, T> {