Sort A Vec Rust

[Solved] Sort A Vec Rust | Rust - Code Explorer | yomemimo.com
Question : sort a vector rust

Answered by : frosti

fn main() { let mut vec = vec![1, 5, 10, 2, 15]; vec.sort(); assert_eq!(vec, vec![1, 2, 5, 10, 15]);
}
Running...

Source : https://rust-lang-nursery.github.io/rust-cookbook/algorithms/sorting.html | Last Update : Thu, 21 Oct 21

Answers related to sort a vec rust

Code Explorer Popular Question For Rust