1
Fork 0

Convert vec::{reverse, swap} to methods.

This commit is contained in:
Huon Wilson 2013-06-29 02:54:03 +10:00
parent a890c2cbf1
commit 9e83b2fe55
10 changed files with 77 additions and 93 deletions

View file

@ -107,7 +107,7 @@ impl<T:Ord> PriorityQueue<T> {
let mut end = q.len();
while end > 1 {
end -= 1;
vec::swap(q.data, 0, end);
q.data.swap(0, end);
q.siftdown_range(0, end)
}
q.to_vec()