From 657081bc9c42eb48aa938f3c40f0b30f69e31aa5 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Sat, 14 Feb 2015 16:28:18 +0530 Subject: [PATCH] Normalize range syntax used in concurrency.md (fixes #22317) --- src/doc/trpl/concurrency.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/doc/trpl/concurrency.md b/src/doc/trpl/concurrency.md index 800b5a2ad9768..3c933c1c5af58 100644 --- a/src/doc/trpl/concurrency.md +++ b/src/doc/trpl/concurrency.md @@ -171,7 +171,7 @@ use std::time::Duration; fn main() { let mut data = vec![1u32, 2, 3]; - for i in 0 .. 2 { + for i in 0..2 { Thread::spawn(move || { data[i] += 1; }); @@ -211,7 +211,7 @@ use std::sync::Mutex; fn main() { let mut data = Mutex::new(vec![1u32, 2, 3]); - for i in 0 .. 2 { + for i in 0..2 { let data = data.lock().unwrap(); Thread::spawn(move || { data[i] += 1; @@ -262,7 +262,7 @@ use std::time::Duration; fn main() { let data = Arc::new(Mutex::new(vec![1u32, 2, 3])); - for i in (0us..2) { + for i in 0us..2 { let data = data.clone(); Thread::spawn(move || { let mut data = data.lock().unwrap(); @@ -285,7 +285,7 @@ thread more closely: # use std::time::Duration; # fn main() { # let data = Arc::new(Mutex::new(vec![1u32, 2, 3])); -# for i in (0us..2) { +# for i in 0us..2 { # let data = data.clone(); Thread::spawn(move || { let mut data = data.lock().unwrap(); @@ -323,7 +323,7 @@ fn main() { let (tx, rx) = mpsc::channel(); - for _ in (0..10) { + for _ in 0..10 { let (data, tx) = (data.clone(), tx.clone()); Thread::spawn(move || { @@ -334,7 +334,7 @@ fn main() { }); } - for _ in 0 .. 10 { + for _ in 0..10 { rx.recv(); } }