Convert vec::{reverse, swap} to methods.
This commit is contained in:
parent
a890c2cbf1
commit
9e83b2fe55
10 changed files with 77 additions and 93 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue