[−][src]Function sorting_rs::slow_sort::slow_sort
pub fn slow_sort<T: PartialOrd>(input: &mut [T])
Sorts a slice in-place using Slow sort
All kinds of slices can be sorted as long as they implement
PartialOrd
.
It's of humorous nature and not useful.
Examples
let mut vec = vec![5,3,2,4]; sorting_rs::slow_sort(&mut vec); assert_eq!(vec, &[2,3,4,5]);
let mut strings = vec!["rustc", "cargo", "rustup"]; sorting_rs::slow_sort(&mut strings); assert_eq!(strings, &["cargo", "rustc", "rustup"]);