itertools::k_smallest

Function key_to_cmp

Source
pub(crate) fn key_to_cmp<T, K, F>(key: F) -> impl FnMut(&T, &T) -> Ordering
where F: FnMut(&T) -> K, K: Ord,