Advent of code 2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
473 B

1 year ago
use std::env;
1 year ago
fn main() {
let day = match env::args().nth(1) {
Some(arg) => arg.parse().unwrap(),
None => 1
};
1 year ago
let result = match day {
1 => advent_of_code::aoc_01_both("./inputs/01-01.txt"),
2 => advent_of_code::aoc_02("./inputs/02-01.txt"),
_ => Err(format!("unsupported day {}", day).into()),
};
1 year ago
match result {
Ok(_) => (),
Err(e) => println!("Error executing day {}: {}", day, e),
}
}