pub fn sort<T: AsRef<str>>(arr: &mut [T])Expand description
Sorts an array via the cmp ordering.
Because this function performs a stable sort, it must be allocating and so is only enabled with the alloc (default) feature.
If alloc is not enabled or you do not require a stable sort, you may instead consider using sort_unstable.
let mut arr = ["file-1", "file-10", "file-2"];
sort(&mut arr);
assert_eq!(&arr, &["file-1", "file-2", "file-10"]);