algo/src/main.rs
Jan Christian Grünhage 62f1b27dff refactor: cargo fmt
2017-08-27 17:26:01 +02:00

17 lines
406 B
Rust

mod algorithms;
use algorithms::insertionsort::Insertionsort;
use algorithms::Algorithm;
fn main() {
let unsorted: Vec<i32> = vec![2498, 29687, 24, 5, 94545, 8, 51, 152, 48, 871, 5];
let sorted = match Insertionsort::sort(unsorted) {
Ok(v) => v,
Err(e) => {
println!("Something went wrong! {}", e);
return;
}
};
println!("{:?}", sorted);
}