fn main() {
let vector = vec![1, 2, 3];
std::thread::spawn(move || {
println!("{}", vector[0]);
});
// vector is "moved" to the other thread, so we can't use it here.
// This sounds bad, but it actually prevents a data race. Hooray!
println!("{}", vector[0]);
}