Merge pull request #134 from mshauneu/master

remove 2 warnings in latest working Multiple threads example
pull/142/head
Dhghomon 3 years ago committed by GitHub
commit 812b58b14c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -8535,13 +8535,13 @@ So we delete the `std::mem::drop`, and now it is okay. `handle` takes `my_string
```rust
fn main() {
let mut my_string = String::from("Can I go inside the thread?");
let my_string = String::from("Can I go inside the thread?");
let handle = std::thread::spawn(move|| {
println!("{}", my_string);
});
handle.join();
handle.join().unwrap();
}
```

Loading…
Cancel
Save