Skip to content

Commit c980aba

Browse files
committed
Auto merge of #27508 - friedm:remove_integer_suffixes, r=alexcrichton
For #27501 r? @steveklabnik
2 parents 4b79add + f53ba18 commit c980aba

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/doc/trpl/concurrency.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ languages. It will not compile:
115115
use std::thread;
116116
117117
fn main() {
118-
let mut data = vec![1u32, 2, 3];
118+
let mut data = vec![1, 2, 3];
119119
120120
for i in 0..3 {
121121
thread::spawn(move || {
@@ -153,7 +153,7 @@ use std::thread;
153153
use std::sync::Mutex;
154154
155155
fn main() {
156-
let mut data = Mutex::new(vec![1u32, 2, 3]);
156+
let mut data = Mutex::new(vec![1, 2, 3]);
157157
158158
for i in 0..3 {
159159
let data = data.lock().unwrap();
@@ -195,7 +195,7 @@ use std::sync::{Arc, Mutex};
195195
use std::thread;
196196

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

200200
for i in 0..3 {
201201
let data = data.clone();
@@ -217,7 +217,7 @@ thread more closely:
217217
# use std::sync::{Arc, Mutex};
218218
# use std::thread;
219219
# fn main() {
220-
# let data = Arc::new(Mutex::new(vec![1u32, 2, 3]));
220+
# let data = Arc::new(Mutex::new(vec![1, 2, 3]));
221221
# for i in 0..3 {
222222
# let data = data.clone();
223223
thread::spawn(move || {
@@ -255,7 +255,7 @@ use std::thread;
255255
use std::sync::mpsc;
256256

257257
fn main() {
258-
let data = Arc::new(Mutex::new(0u32));
258+
let data = Arc::new(Mutex::new(0));
259259

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

@@ -293,7 +293,7 @@ fn main() {
293293
let tx = tx.clone();
294294

295295
thread::spawn(move || {
296-
let answer = 42u32;
296+
let answer = 42;
297297

298298
tx.send(answer);
299299
});

0 commit comments

Comments
 (0)