Why on earth is this code not compiling?
use std::thread;
use std::thread::JoinHandle;
fn main() {
let mut handles: Vec<JoinHandle<i32>> = Vec::new();
let jh = thread::spawn(move || {
1 + 1
});
handles.push(jh);
for h in handles.iter() {
h.join();
}
}