about summary refs log tree commit diff
path: root/src/libcollections
diff options
context:
space:
mode:
authorAdolfo OchagavĂ­a <aochagavia92@gmail.com>2014-05-18 14:37:15 -0700
committerAdolfo OchagavĂ­a <aochagavia92@gmail.com>2014-05-18 14:37:15 -0700
commit8e9567dad8289dab79c61438da9229409e07b735 (patch)
tree09217c860ae48e45200ff4707b43b419be6dba61 /src/libcollections
parenta62395f01ca4f2db1b9004aa4f54422956950304 (diff)
downloadrust-8e9567dad8289dab79c61438da9229409e07b735.tar.gz
rust-8e9567dad8289dab79c61438da9229409e07b735.zip
Replaced Ord by TotalOrd in priority queue
Diffstat (limited to 'src/libcollections')
-rw-r--r--src/libcollections/priority_queue.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcollections/priority_queue.rs b/src/libcollections/priority_queue.rs
index f9f4945efc7..43c4d681322 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:Ord> Container for PriorityQueue<T> {
+impl<T: TotalOrd> Container for PriorityQueue<T> {
     /// Returns the length of the queue
     fn len(&self) -> uint { self.data.len() }
 }
 
-impl<T:Ord> Mutable for PriorityQueue<T> {
+impl<T: TotalOrd> Mutable for PriorityQueue<T> {
     /// Drop all items from the queue
     fn clear(&mut self) { self.data.truncate(0) }
 }
 
-impl<T:Ord> PriorityQueue<T> {
+impl<T: TotalOrd> PriorityQueue<T> {
     /// An iterator visiting all values in underlying vector, in
     /// arbitrary order.
     pub fn iter<'a>(&'a self) -> Items<'a, T> {
@@ -197,7 +197,7 @@ impl<'a, T> Iterator<&'a T> for Items<'a, T> {
     fn size_hint(&self) -> (uint, Option<uint>) { self.iter.size_hint() }
 }
 
-impl<T: Ord> FromIterator<T> for PriorityQueue<T> {
+impl<T: TotalOrd> FromIterator<T> for PriorityQueue<T> {
     fn from_iter<Iter: Iterator<T>>(iter: Iter) -> PriorityQueue<T> {
         let mut q = PriorityQueue::new();
         q.extend(iter);
@@ -205,7 +205,7 @@ impl<T: Ord> FromIterator<T> for PriorityQueue<T> {
     }
 }
 
-impl<T: Ord> Extendable<T> for PriorityQueue<T> {
+impl<T: TotalOrd> Extendable<T> for PriorityQueue<T> {
     fn extend<Iter: Iterator<T>>(&mut self, mut iter: Iter) {
         let (lower, _) = iter.size_hint();