about summary refs log tree commit diff
path: root/src/libcollections/binary_heap.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcollections/binary_heap.rs')
-rw-r--r--src/libcollections/binary_heap.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcollections/binary_heap.rs b/src/libcollections/binary_heap.rs
index 8aa4c77f6f9..56bc573cbb4 100644
--- a/src/libcollections/binary_heap.rs
+++ b/src/libcollections/binary_heap.rs
@@ -696,7 +696,7 @@ mod tests {
         let iterout = [9, 5, 3];
         let heap = BinaryHeap::from_vec(data);
         let mut i = 0;
-        for el in heap.iter() {
+        for el in &heap {
             assert_eq!(*el, iterout[i]);
             i += 1;
         }
@@ -884,7 +884,7 @@ mod tests {
 
         let mut q: BinaryHeap<uint> = xs.iter().rev().map(|&x| x).collect();
 
-        for &x in xs.iter() {
+        for &x in &xs {
             assert_eq!(q.pop().unwrap(), x);
         }
     }