← Quit0 / 0 correct
Why does this compile even though the threads borrow `v` without `move`?
let v = vec![1, 2, 3];
std::thread::scope(|s| {
s.spawn(|| println!("{v:?}"));
s.spawn(|| println!("{}", v.len()));
});Why does this compile even though the threads borrow `v` without `move`?
let v = vec![1, 2, 3];
std::thread::scope(|s| {
s.spawn(|| println!("{v:?}"));
s.spawn(|| println!("{}", v.len()));
});