Function core::slice::sort::merge

source ·
unsafe fn merge<T, F>(v: &mut [T], mid: usize, buf: *mut T, is_less: &mut F)where
    F: FnMut(&T, &T) -> bool,
🔬This is a nightly-only experimental API. (slice_internals)
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.