Function rayon::slice::mergesort::merge

source ·
unsafe fn merge<T, F>(v: &mut [T], mid: usize, buf: *mut T, is_less: &F)where
    F: Fn(&T, &T) -> bool,
Expand description

Merges non-decreasing runs v[..mid] and v[mid..] using buf as temporary storage, and stores the result into v[..].

Safety

The two slices must be non-empty and mid must be in bounds. Buffer buf must be long enough to hold a copy of the shorter slice. Also, T must not be a zero-sized type.