]> git.lizzy.rs Git - rust.git/commitdiff
Rename to_vec and to_sorted_vec
authorAdolfo Ochagavía <aochagavia92@gmail.com>
Sun, 18 May 2014 22:04:43 +0000 (15:04 -0700)
committerAdolfo Ochagavía <aochagavia92@gmail.com>
Sun, 18 May 2014 22:28:29 +0000 (15:28 -0700)
src/libcollections/priority_queue.rs

index 43c4d681322e6036af57d16088bec48b36d0baf6..56878ebd6edaba50028d2de1acc1551dc7fb9112 100644 (file)
@@ -98,12 +98,18 @@ pub fn replace(&mut self, mut item: T) -> 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 {