Function core::slice::sort::find_streak
source · fn find_streak<T, F>(v: &[T], is_less: &mut F) -> (usize, bool)where
F: FnMut(&T, &T) -> bool,
🔬This is a nightly-only experimental API. (
slice_internals
)Expand description
Finds a streak of presorted elements starting at the beginning of the slice. Returns the first value that is not part of said streak, and a bool denoting whether the streak was reversed. Streaks can be increasing or decreasing.