mozilla/rust — pull request #14623 by exscape (2014-06-03 14:26:20+00:00)
Title: Add next_permutation and prev_permutation onto MutableOrdVector<T>.

Unlike ImmutableClonableVector::permutations() which returns an iterator,
cloning the entire array each iteration, these methods mutate the vector in-place.
For that reason, these methods are much faster; between 35-55 times faster,
depending on the benchmark. They also generate permutations in lexicographical order.