Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

sort a vector rust

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

    assert_eq!(vec, vec![1, 2, 5, 10, 15]);
}
Running...
Source by rust-lang-nursery.github.io #
 
PREVIOUS NEXT
Tagged: #sort #vector #rust
ADD COMMENT
Topic
Name
8+7 =