Skip to main content

iter_next_chunk_back_erased

Function iter_next_chunk_back_erased 

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

Version of iter_next_chunk_back 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.