devela::_dep::itertools

Function sorted_unstable

pub fn sorted_unstable<I>(iterable: I) -> IntoIter<<I as IntoIterator>::Item> 
where I: IntoIterator, <I as IntoIterator>::Item: Ord,
Available on crate feature dep_itertools only.
Expand description

Sort all iterator elements into a new iterator in ascending order. This sort is unstable (i.e., may reorder equal elements).

IntoIterator enabled version of Itertools::sorted_unstable.

use itertools::sorted_unstable;
use itertools::assert_equal;

assert_equal(sorted_unstable("rust".chars()), "rstu".chars());