Skip to content

Commit 2b06105

Browse files
committed
Rename to_vec and to_sorted_vec
1 parent 8e9567d commit 2b06105

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/libcollections/priority_queue.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,18 @@ impl<T: TotalOrd> PriorityQueue<T> {
9898
item
9999
}
100100

101+
#[deprecated="renamed to `into_vec`"]
102+
fn to_vec(self) -> Vec<T> { self.into_vec() }
103+
104+
#[deprecated="renamed to `into_sorted_vec`"]
105+
fn to_sorted_vec(self) -> Vec<T> { self.into_sorted_vec() }
106+
101107
/// Consume the PriorityQueue and return the underlying vector
102-
pub fn to_vec(self) -> Vec<T> { let PriorityQueue{data: v} = self; v }
108+
pub fn into_vec(self) -> Vec<T> { let PriorityQueue{data: v} = self; v }
103109

104110
/// Consume the PriorityQueue and return a vector in sorted
105111
/// (ascending) order
106-
pub fn to_sorted_vec(self) -> Vec<T> {
112+
pub fn into_sorted_vec(self) -> Vec<T> {
107113
let mut q = self;
108114
let mut end = q.len();
109115
while end > 1 {

0 commit comments

Comments
 (0)