mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-05-03 20:22:32 +08:00
12 lines
177 B
Rust
12 lines
177 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();
|
|
}
|