Skip to content

Commit

Permalink
auto merge of #17456 : alfie/rust/master, r=steveklabnik
Browse files Browse the repository at this point in the history
While reading the intro, I was confused as to why there were two variables named "numbers". Unless I'm mistaken and it's not necessary, let's get rid of it to make it clearer.
  • Loading branch information
bors committed Sep 23, 2014
2 parents 0a4c136 + 9d95729 commit 2f9669c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/doc/intro.md
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 2f9669c

Please sign in to comment.