mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-05-04 12:38:07 +08:00
12 lines
179 B
Rust
12 lines
179 B
Rust
|
use std::thread;
|
||
|
|
||
|
fn main() {
|
||
|
let v = vec![1, 2, 3];
|
||
|
|
||
|
let handle = thread::spawn(|| {
|
||
|
println!("Here's a vector: {:?}", v);
|
||
|
});
|
||
|
|
||
|
handle.join().unwrap();
|
||
|
}
|