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:
parent
20016b92c8
commit
e6f9b08610
3 changed files with 20 additions and 2 deletions
|
@ -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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue