Function hydroflow::util::sort_unstable_by_key_hrtb

source ยท
pub fn sort_unstable_by_key_hrtb<T, F, K>(slice: &mut [T], f: F)
where F: for<'a> Fn(&'a T) -> &'a K, K: Ord,
Expand description

Sort a slice using a key fn which returns references.

From addendum in https://stackoverflow.com/questions/56105305/how-to-sort-a-vec-of-structs-by-a-string-field