Function itertools::sorted_unstable

source ·
pub fn sorted_unstable<I>(iterable: I) -> IntoIter<I::Item> where
    I: IntoIterator,
    I::Item: Ord,
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());