about summary refs log tree commit diff
path: root/src/libextra/container.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libextra/container.rs')
-rw-r--r--src/libextra/container.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/libextra/container.rs b/src/libextra/container.rs
index 0ca992fdacd..5b2de22ff07 100644
--- a/src/libextra/container.rs
+++ b/src/libextra/container.rs
@@ -41,9 +41,8 @@ pub trait Deque<T> : Mutable {
 
 #[cfg(test)]
 mod bench {
-
     use std::container::MutableMap;
-    use std::{vec,rand,uint};
+    use std::{vec, rand};
     use std::rand::RngUtil;
     use test::BenchHarness;
 
@@ -54,7 +53,7 @@ mod bench {
         let mut rng = rand::XorShiftRng::new();
 
         map.clear();
-        for uint::range(0,n) |_i| {
+        foreach _ in range(0, n) {
             map.insert(rng.gen::<uint>() % n, 1);
         }
 
@@ -71,7 +70,7 @@ mod bench {
                                                  bh: &mut BenchHarness) {
         // setup
         map.clear();
-        for uint::range(0, n) |i| {
+        foreach i in range(0u, n) {
             map.insert(i*2, 1);
         }
 
@@ -109,7 +108,7 @@ mod bench {
                                                map: &mut M,
                                                bh: &mut BenchHarness) {
         // setup
-        for uint::range(0, n) |i| {
+        foreach i in range(0u, n) {
             map.insert(i, 1);
         }
 
@@ -120,4 +119,4 @@ mod bench {
             i = (i + 1) % n;
         }
      }
-}
\ No newline at end of file
+}