fn iter_next_chunk_erased<T>(
    buffer: &mut [MaybeUninit<T>],
    iter: &mut impl Iterator<Item = T>
) -> Result<(), usize>
Expand description

Version of iter_next_chunk using a passed-in slice in order to avoid needing to monomorphize for every array length.

Unfortunately this loop has two exit conditions, the buffer filling up or the iterator running out of items, making it tend to optimize poorly.