rust take slice of vec ref code example Example: rust sort fn main() { let mut vec = vec![1, 5, 10, 2, 15]; vec.sort(); }