T: Ord + Hash.
Input: I have an
Output: I want a vec containing in sorted order the elements of the iterator.
I am currently doing something like:
let mut v = it.collect::<HashSet<_>>().iter().collect::<Vec<_>>(); v.sort(); return v;
Question: The above seems a bit hacky. Is there a more elegant approach to this ?