pub(crate) fn array_from_iterator<I, T, E, const N: usize>(
iter: I,
expected: &dyn Expected,
) -> Result<[T; N], E>Expand description
Collect an array of a fixed size from an iterator.
ยงSafety
The code follow exactly the pattern of initializing an array element-by-element from the standard library. https://doc.rust-lang.org/nightly/std/mem/union.MaybeUninit.html#initializing-an-array-element-by-element