diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2014-05-05 18:56:44 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2014-05-06 23:12:54 -0700 |
| commit | 090040bf4037a094e50b03d79e4baf5cd89c912b (patch) | |
| tree | 27fa91d623889d59260d3db167abdfa8c4288849 /src/libcollections/priority_queue.rs | |
| parent | 24f6f26e633e50b5b59f9d0f6cca0b1e49e215d9 (diff) | |
| download | rust-090040bf4037a094e50b03d79e4baf5cd89c912b.tar.gz rust-090040bf4037a094e50b03d79e4baf5cd89c912b.zip | |
librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, except
for `~str`/`~[]`. Note that `~self` still remains, since I forgot to add support for `Box<self>` before the snapshot. How to update your code: * Instead of `~EXPR`, you should write `box EXPR`. * Instead of `~TYPE`, you should write `Box<Type>`. * Instead of `~PATTERN`, you should write `box PATTERN`. [breaking-change]
Diffstat (limited to 'src/libcollections/priority_queue.rs')
| -rw-r--r-- | src/libcollections/priority_queue.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libcollections/priority_queue.rs b/src/libcollections/priority_queue.rs index e37e2a6f234..f9f4945efc7 100644 --- a/src/libcollections/priority_queue.rs +++ b/src/libcollections/priority_queue.rs @@ -270,24 +270,24 @@ mod tests { #[test] fn test_push_unique() { - let mut heap = PriorityQueue::from_vec(vec!(~2, ~4, ~9)); + let mut heap = PriorityQueue::from_vec(vec!(box 2, box 4, box 9)); assert_eq!(heap.len(), 3); - assert!(*heap.top() == ~9); + assert!(*heap.top() == box 9); heap.push(box 11); assert_eq!(heap.len(), 4); - assert!(*heap.top() == ~11); + assert!(*heap.top() == box 11); heap.push(box 5); assert_eq!(heap.len(), 5); - assert!(*heap.top() == ~11); + assert!(*heap.top() == box 11); heap.push(box 27); assert_eq!(heap.len(), 6); - assert!(*heap.top() == ~27); + assert!(*heap.top() == box 27); heap.push(box 3); assert_eq!(heap.len(), 7); - assert!(*heap.top() == ~27); + assert!(*heap.top() == box 27); heap.push(box 103); assert_eq!(heap.len(), 8); - assert!(*heap.top() == ~103); + assert!(*heap.top() == box 103); } #[test] |
