diff options
| author | Palmer Cox <p@lmercox.com> | 2014-01-14 22:32:24 -0500 |
|---|---|---|
| committer | Palmer Cox <p@lmercox.com> | 2014-01-18 01:15:15 -0500 |
| commit | 3fd8c8b3306ae33bdc85811aa410ba01967922bc (patch) | |
| tree | 36818b3c2f6f3c6ba8e145f4a1098dcb87f5bb44 /src/libextra/priority_queue.rs | |
| parent | c58d2bacb78ed0d2b9c0c0909e56f390b525aabd (diff) | |
| download | rust-3fd8c8b3306ae33bdc85811aa410ba01967922bc.tar.gz rust-3fd8c8b3306ae33bdc85811aa410ba01967922bc.zip | |
Rename iterators for consistency
Rename existing iterators to get rid of the Iterator suffix and to give them names that better describe the things being iterated over.
Diffstat (limited to 'src/libextra/priority_queue.rs')
| -rw-r--r-- | src/libextra/priority_queue.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libextra/priority_queue.rs b/src/libextra/priority_queue.rs index bba7d767732..cf3c265e3fb 100644 --- a/src/libextra/priority_queue.rs +++ b/src/libextra/priority_queue.rs @@ -36,8 +36,8 @@ impl<T:Ord> Mutable for PriorityQueue<T> { impl<T:Ord> PriorityQueue<T> { /// An iterator visiting all values in underlying vector, in /// arbitrary order. - pub fn iter<'a>(&'a self) -> PriorityQueueIterator<'a, T> { - PriorityQueueIterator { iter: self.data.iter() } + pub fn iter<'a>(&'a self) -> Items<'a, T> { + Items { iter: self.data.iter() } } /// Returns the greatest item in the queue - fails if empty @@ -177,11 +177,11 @@ impl<T:Ord> PriorityQueue<T> { } /// PriorityQueue iterator -pub struct PriorityQueueIterator <'a, T> { - priv iter: vec::VecIterator<'a, T>, +pub struct Items <'a, T> { + priv iter: vec::Items<'a, T>, } -impl<'a, T> Iterator<&'a T> for PriorityQueueIterator<'a, T> { +impl<'a, T> Iterator<&'a T> for Items<'a, T> { #[inline] fn next(&mut self) -> Option<(&'a T)> { self.iter.next() } |
