diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2013-12-20 14:42:00 +1100 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2013-12-22 18:16:50 +1100 |
| commit | 2e8c522c6206eacb8f8d5e2d30590c4080cbed7a (patch) | |
| tree | 93ebeaa7880139d5ec21114aeec644c872b9c254 /src/libextra/priority_queue.rs | |
| parent | 1b1e4caa79077d48c1bf56bf5bfa7bfc83fdf941 (diff) | |
| download | rust-2e8c522c6206eacb8f8d5e2d30590c4080cbed7a.tar.gz rust-2e8c522c6206eacb8f8d5e2d30590c4080cbed7a.zip | |
std::vec: make the sorting closure use `Ordering` rather than just being
(implicitly) less_eq.
Diffstat (limited to 'src/libextra/priority_queue.rs')
| -rw-r--r-- | src/libextra/priority_queue.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/libextra/priority_queue.rs b/src/libextra/priority_queue.rs index 3c1743cfe34..bba7d767732 100644 --- a/src/libextra/priority_queue.rs +++ b/src/libextra/priority_queue.rs @@ -231,11 +231,7 @@ mod tests { fn test_top_and_pop() { let data = ~[2u, 4, 6, 2, 1, 8, 10, 3, 5, 7, 0, 9, 1]; let mut sorted = data.clone(); -<<<<<<< HEAD - sorted.sort(|x, y| x.le(y)); -======= sorted.sort(); ->>>>>>> 9ceda35... std::vec: add a sugary .sort() method for plain Ord sorting. let mut heap = PriorityQueue::from_vec(data); while !heap.is_empty() { assert_eq!(heap.top(), sorted.last()); |
