Fix doc (fixup #24031)
This commit is contained in:
parent
29582d39bd
commit
b62c11023c
@ -245,10 +245,9 @@ We now call `clone()` on our `Arc`, which increases the internal count. This
|
||||
handle is then moved into the new thread. Let's examine the body of the
|
||||
thread more closely:
|
||||
|
||||
```
|
||||
```rust
|
||||
# use std::sync::{Arc, Mutex};
|
||||
# use std::thread;
|
||||
#
|
||||
# fn main() {
|
||||
# let data = Arc::new(Mutex::new(vec![1u32, 2, 3]));
|
||||
# for i in 0..2 {
|
||||
@ -258,7 +257,6 @@ thread::spawn(move || {
|
||||
data[i] += 1;
|
||||
});
|
||||
# }
|
||||
#
|
||||
# thread::sleep_ms(50);
|
||||
# }
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user