This is type inference not being able to infer through a wrapping type—Option<_>
in your case—when the wrapped type needs to be coerced in some way.
Besides your [..]
workaround,
assert_eq!(iter.next().unwrap(), &[1, 1, 1]);
also works or using the as _
trick to nudge type inference a bit:
assert_eq!(iter.next(), Some(&[1, 1, 1] as _));