1
Fork 0

Implement size_hint() on all remaining Iterators

Add size_hint() to the Iterators in libextra and the Iterator in
libsyntax.

Skip deque for the moment, as it's being worked on elsewhere.
This commit is contained in:
Kevin Ballard 2013-07-03 11:30:12 -07:00
parent 20016b92c8
commit e6f9b08610
3 changed files with 20 additions and 2 deletions

View file

@ -186,6 +186,9 @@ pub struct PriorityQueueIterator <'self, T> {
impl<'self, T> Iterator<&'self T> for PriorityQueueIterator<'self, T> {
#[inline]
fn next(&mut self) -> Option<(&'self T)> { self.iter.next() }
#[inline]
fn size_hint(&self) -> (uint, Option<uint>) { self.iter.size_hint() }
}
#[cfg(test)]