about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlfie John <alfiej@fastmail.fm>2014-09-22 20:48:10 +0000
committerAlfie John <alfiej@fastmail.fm>2014-09-22 20:48:10 +0000
commit9d95729af4af93bf32cad1acef00a5695078e77b (patch)
treeb1a8d5f2ba92a2f4d172555783696ee96df57933
parent437179ed8bf7f7672f84b19265df1ce569e70490 (diff)
downloadrust-9d95729af4af93bf32cad1acef00a5695078e77b.tar.gz
rust-9d95729af4af93bf32cad1acef00a5695078e77b.zip
doc: Removing repeated variable name to make it less ambiguious
-rw-r--r--src/doc/intro.md6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/doc/intro.md b/src/doc/intro.md
index 503ea2b1bbe..14027b93419 100644
--- a/src/doc/intro.md
+++ b/src/doc/intro.md
@@ -300,8 +300,7 @@ Here's some code:
 use std::sync::Arc;
 
 fn main() {
-    let numbers = vec![1i, 2i, 3i];
-    let numbers = Arc::new(numbers);
+    let numbers = Arc::new(vec![1i, 2i, 3i]);
 
     for num in range(0u, 3) {
         let (tx, rx)  = channel();
@@ -346,8 +345,7 @@ and modify it to mutate the shared state:
 use std::sync::{Arc, Mutex};
 
 fn main() {
-    let numbers = vec![1i, 2i, 3i];
-    let numbers_lock = Arc::new(Mutex::new(numbers));
+    let numbers_lock = Arc::new(Mutex::new(vec![1i, 2i, 3i]));
 
     for num in range(0u, 3) {
         let (tx, rx)  = channel();