let v: Option<Vec<i32>> = (0..5).map(|i| { print!("{i} "); if i == 3 { None } else { Some(i) } }).collect(); // prints 0 1 2 3
One of the issues with type inference, this exact same code does different things depending on whether the result is assigned to `Option<Vec<i32>>` or `Vec<Option<i32>>`