From 3fd8c8b3306ae33bdc85811aa410ba01967922bc Mon Sep 17 00:00:00 2001 From: Palmer Cox Date: Tue, 14 Jan 2014 22:32:24 -0500 Subject: 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. --- src/libextra/priority_queue.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libextra/priority_queue.rs') 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 Mutable for PriorityQueue { impl PriorityQueue { /// 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 PriorityQueue { } /// 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() } -- cgit 1.4.1-3-g733a5