out::iter
pub fn min_unstable<T: Ord>( iter: impl IntoIterator<Item = T>, n: usize) -> Vec<T>
Returns the n smallest items from an iterator.
n
This sort is unstable (i.e. may reorder equal elements) and typically faster than min.
min
Panics if n > len.
n > len
let min = out::iter::min_unstable(-10..10, 3); assert_eq!(min, [-8, -9, -10]);