diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-05-31 10:43:52 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-06-01 10:31:27 -0700 |
| commit | bba701c59d84eac4e20d0796ec06db8d1cdd39cf (patch) | |
| tree | 3c2109ca567bbc7e7b8d66da7282dac8f8926da6 /src/libcollections/priority_queue.rs | |
| parent | c605c2b57b412402e6b491e91852fd9dbadeb551 (diff) | |
| download | rust-bba701c59d84eac4e20d0796ec06db8d1cdd39cf.tar.gz rust-bba701c59d84eac4e20d0796ec06db8d1cdd39cf.zip | |
std: Drop Total from Total{Eq,Ord}
This completes the last stage of the renaming of the comparison hierarchy of traits. This change renames TotalEq to Eq and TotalOrd to Ord. In the future the new Eq/Ord will be filled out with their appropriate methods, but for now this change is purely a renaming change. [breaking-change]
Diffstat (limited to 'src/libcollections/priority_queue.rs')
| -rw-r--r-- | src/libcollections/priority_queue.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcollections/priority_queue.rs b/src/libcollections/priority_queue.rs index 4a0daf529de..3c1337a0382 100644 --- a/src/libcollections/priority_queue.rs +++ b/src/libcollections/priority_queue.rs @@ -22,17 +22,17 @@ pub struct PriorityQueue<T> { data: Vec<T>, } -impl<T: TotalOrd> Container for PriorityQueue<T> { +impl<T: Ord> Container for PriorityQueue<T> { /// Returns the length of the queue fn len(&self) -> uint { self.data.len() } } -impl<T: TotalOrd> Mutable for PriorityQueue<T> { +impl<T: Ord> Mutable for PriorityQueue<T> { /// Drop all items from the queue fn clear(&mut self) { self.data.truncate(0) } } -impl<T: TotalOrd> PriorityQueue<T> { +impl<T: Ord> PriorityQueue<T> { /// An iterator visiting all values in underlying vector, in /// arbitrary order. pub fn iter<'a>(&'a self) -> Items<'a, T> { @@ -214,7 +214,7 @@ impl<'a, T> Iterator<&'a T> for Items<'a, T> { fn size_hint(&self) -> (uint, Option<uint>) { self.iter.size_hint() } } -impl<T: TotalOrd> FromIterator<T> for PriorityQueue<T> { +impl<T: Ord> FromIterator<T> for PriorityQueue<T> { fn from_iter<Iter: Iterator<T>>(iter: Iter) -> PriorityQueue<T> { let mut q = PriorityQueue::new(); q.extend(iter); @@ -222,7 +222,7 @@ impl<T: TotalOrd> FromIterator<T> for PriorityQueue<T> { } } -impl<T: TotalOrd> Extendable<T> for PriorityQueue<T> { +impl<T: Ord> Extendable<T> for PriorityQueue<T> { fn extend<Iter: Iterator<T>>(&mut self, mut iter: Iter) { let (lower, _) = iter.size_hint(); |
