From 234acad404535868ecd7f5b48c3e120c4ea559c9 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Thu, 1 Aug 2013 18:35:46 -0400 Subject: replace `range` with an external iterator --- src/libstd/unstable/sync.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libstd/unstable') diff --git a/src/libstd/unstable/sync.rs b/src/libstd/unstable/sync.rs index f5c82bad2b1..4b5c72e5a86 100644 --- a/src/libstd/unstable/sync.rs +++ b/src/libstd/unstable/sync.rs @@ -436,9 +436,9 @@ mod tests { use cell::Cell; use comm; use option::*; + use prelude::*; use super::{Exclusive, UnsafeAtomicRcBox, atomically}; use task; - use uint; use util; #[test] @@ -458,13 +458,13 @@ mod tests { let total = Exclusive::new(~0); - for uint::range(0, num_tasks) |_i| { + foreach _ in range(0u, num_tasks) { let total = total.clone(); let (port, chan) = comm::stream(); futures.push(port); do task::spawn || { - for uint::range(0, count) |_i| { + foreach _ in range(0u, count) { do total.with |count| { **count += 1; } -- cgit 1.4.1-3-g733a5