Is it possible without intermediate storage to collect into tuple from an iterator over results?
It would be great to combine try_collect and collect_tuples in one expression.
Also, why is there no way to collect into an array? Or did I miss it?
use itertools::Itertools;
fn main() {
let num_vec: Result<Vec<_>, _> = "1,2".split(",").map(|it| it.parse::<usize>()).try_collect();
let tuple: Result<(_, _), _> = num_vec.map(|it| it.into_iter().collect_tuple().unwrap());
dbg!(&tuple);
}