about summary refs log tree commit diff
path: root/src/libstd/priority_queue.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-03-05 21:12:38 -0800
committerbors <bors@rust-lang.org>2013-03-05 21:12:38 -0800
commit165cc9e2c424b674a9e6fc88cc7c86ebc7d55b98 (patch)
tree43dcf5c92761891df95bc33c2480426708926e73 /src/libstd/priority_queue.rs
parent7c9b808d46d6b718cd25a813c9426c0c199b0acb (diff)
parent743cfce7032e3b0649c22bf1c397280192bf9e95 (diff)
downloadrust-165cc9e2c424b674a9e6fc88cc7c86ebc7d55b98.tar.gz
rust-165cc9e2c424b674a9e6fc88cc7c86ebc7d55b98.zip
auto merge of #5213 : erickt/rust/vec-ref, r=graydon
This patch series changes a handful of vec functions to return references instead of copies. The one downside with making this change is that these functions aren't usable in a couple cases now due to some purity complaints. For example, this [change](https://github.com/erickt/rust/commit/c31e81a532fc07e89be33cadb5109d167aa725f4#L1R87). I couldn't figure out a way to get `last` to work on a `@mut ~[...]` type, so I ended up having to use `*crate_cache[crate_cache.len() - 1].metas`.
Diffstat (limited to 'src/libstd/priority_queue.rs')
-rw-r--r--src/libstd/priority_queue.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/priority_queue.rs b/src/libstd/priority_queue.rs
index 4b92bd7543a..2a2c655cca9 100644
--- a/src/libstd/priority_queue.rs
+++ b/src/libstd/priority_queue.rs
@@ -197,7 +197,7 @@ mod tests {
         let mut sorted = merge_sort(data, le);
         let mut heap = from_vec(data);
         while !heap.is_empty() {
-            assert *heap.top() == sorted.last();
+            assert heap.top() == sorted.last();
             assert heap.pop() == sorted.pop();
         }
     }