mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-08 09:38:26 +03:00
doc: Removing repeated variable name to make it less ambiguious
This commit is contained in:
+2
-4
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user