Function rayon::slice::quicksort::partition

source ·
fn partition<T, F>(v: &mut [T], pivot: usize, is_less: &F) -> (usize, bool)where
    F: Fn(&T, &T) -> bool,
Expand description

Partitions v into elements smaller than v[pivot], followed by elements greater than or equal to v[pivot].

Returns a tuple of:

  1. Number of elements smaller than v[pivot].
  2. True if v was already partitioned.