File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 873ae555e9a42fd12b0a92134112ec000d749ab2
2
+ refs/heads/master: 9ed27df180be7b006bbbd364812767280087b123
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 210f0dcf007104240b2e286ed0b80cb4a61d7bae
5
5
refs/heads/try: 957472483d3a2f43c0e4f7c2056280a1022af93c
Original file line number Diff line number Diff line change @@ -424,11 +424,11 @@ Let's see an example. This Rust code will not compile:
424
424
use std::thread::Thread;
425
425
426
426
fn main () {
427
- let mut numbers = vec! [1i, 2i, 3i ];
427
+ let mut numbers = vec! [1is, 2is, 3is ];
428
428
429
- for i in range(0u, 3u) {
429
+ for i in 0..3 {
430
430
Thread::spawn(move || {
431
- for j in range(0, 3) { numbers[j] += 1 }
431
+ for j in 0..3 { numbers[j] += 1 }
432
432
});
433
433
}
434
434
}
@@ -478,9 +478,9 @@ use std::thread::Thread;
478
478
use std::sync::{Arc,Mutex};
479
479
480
480
fn main () {
481
- let numbers = Arc::new(Mutex::new(vec! [1i, 2i, 3i ]));
481
+ let numbers = Arc::new(Mutex::new(vec! [1is, 2is, 3is ]));
482
482
483
- for i in range(0u, 3u) {
483
+ for i in 0..3 {
484
484
let number = numbers.clone ();
485
485
Thread::spawn(move || {
486
486
let mut array = number.lock().unwrap ();
You can’t perform that action at this time.
0 commit comments