Is there any way to unpack an iterator into a tuple?
The itertools crate has methods like tuples and next_tuple that can help with this. use itertools::Itertools; // 0.9.0 fn main() { let v = vec![1, 2, 3]; let (a, b) = v.iter().next_tuple().unwrap(); assert_eq!(a, &1); assert_eq!(b, &2); }