Skip to content

doc: Removing repeated variable name to make it less ambiguious #17456

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/doc/intro.md
Original file line number Diff line number Diff line change
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