Skip to main content

partition_in_place

Function partition_in_place 

Source
pub(crate) fn partition_in_place<T>(
    slice: &mut [T],
    pred: impl FnMut(&T) -> bool,
) -> usize
Expand description

Partitions slice in place so that elements matching pred come first, preserving the original relative order within each group. Returns the number of matching elements.

Stable replacement for the unstable Iterator::partition_in_place.