about summary refs log tree commit diff
path: root/src/libcollections/priority_queue.rs
diff options
context:
space:
mode:
authorAdolfo OchagavĂ­a <aochagavia92@gmail.com>2014-05-18 15:04:43 -0700
committerAdolfo OchagavĂ­a <aochagavia92@gmail.com>2014-05-18 15:28:29 -0700
commit2b06105c2a9f188df1e24c10c3d28c8f869cd558 (patch)
treea9242a7b8b75570bab0e54cd8634dfda491a06f0 /src/libcollections/priority_queue.rs
parent8e9567dad8289dab79c61438da9229409e07b735 (diff)
downloadrust-2b06105c2a9f188df1e24c10c3d28c8f869cd558.tar.gz
rust-2b06105c2a9f188df1e24c10c3d28c8f869cd558.zip
Rename to_vec and to_sorted_vec
Diffstat (limited to 'src/libcollections/priority_queue.rs')
-rw-r--r--src/libcollections/priority_queue.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libcollections/priority_queue.rs b/src/libcollections/priority_queue.rs
index 43c4d681322..56878ebd6ed 100644
--- a/src/libcollections/priority_queue.rs
+++ b/src/libcollections/priority_queue.rs
@@ -98,12 +98,18 @@ impl<T: TotalOrd> PriorityQueue<T> {
         item
     }
 
+    #[deprecated="renamed to `into_vec`"]
+    fn to_vec(self) -> Vec<T> { self.into_vec() }
+
+    #[deprecated="renamed to `into_sorted_vec`"]
+    fn to_sorted_vec(self) -> Vec<T> { self.into_sorted_vec() }
+
     /// Consume the PriorityQueue and return the underlying vector
-    pub fn to_vec(self) -> Vec<T> { let PriorityQueue{data: v} = self; v }
+    pub fn into_vec(self) -> Vec<T> { let PriorityQueue{data: v} = self; v }
 
     /// Consume the PriorityQueue and return a vector in sorted
     /// (ascending) order
-    pub fn to_sorted_vec(self) -> Vec<T> {
+    pub fn into_sorted_vec(self) -> Vec<T> {
         let mut q = self;
         let mut end = q.len();
         while end > 1 {