Skip to content

remove unneeded integer suffixes from concurrency chapter #27508

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

Merged
merged 1 commit into from
Aug 4, 2015
Merged
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
12 changes: 6 additions & 6 deletions src/doc/trpl/concurrency.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ languages. It will not compile:
use std::thread;

fn main() {
let mut data = vec![1u32, 2, 3];
let mut data = vec![1, 2, 3];

for i in 0..3 {
thread::spawn(move || {
Expand Down Expand Up @@ -153,7 +153,7 @@ use std::thread;
use std::sync::Mutex;

fn main() {
let mut data = Mutex::new(vec![1u32, 2, 3]);
let mut data = Mutex::new(vec![1, 2, 3]);

for i in 0..3 {
let data = data.lock().unwrap();
Expand Down Expand Up @@ -195,7 +195,7 @@ use std::sync::{Arc, Mutex};
use std::thread;

fn main() {
let data = Arc::new(Mutex::new(vec![1u32, 2, 3]));
let data = Arc::new(Mutex::new(vec![1, 2, 3]));

for i in 0..3 {
let data = data.clone();
Expand All @@ -217,7 +217,7 @@ thread more closely:
# use std::sync::{Arc, Mutex};
# use std::thread;
# fn main() {
# let data = Arc::new(Mutex::new(vec![1u32, 2, 3]));
# let data = Arc::new(Mutex::new(vec![1, 2, 3]));
# for i in 0..3 {
# let data = data.clone();
thread::spawn(move || {
Expand Down Expand Up @@ -255,7 +255,7 @@ use std::thread;
use std::sync::mpsc;

fn main() {
let data = Arc::new(Mutex::new(0u32));
let data = Arc::new(Mutex::new(0));

let (tx, rx) = mpsc::channel();

Expand Down Expand Up @@ -293,7 +293,7 @@ fn main() {
let tx = tx.clone();

thread::spawn(move || {
let answer = 42u32;
let answer = 42;

tx.send(answer);
});
Expand Down