use itertools::Itertools;

fn selection_sort(mut v: &mut [u8]) {
    while let Some(smallest) = v.iter().position_min() {
        v.swap(0, smallest);
        v = &mut v[1..];
    }
}

Rust Playground link