Fix main cli
This commit is contained in:
parent
8b407fe5e0
commit
3b4dcd6ee8
2 changed files with 4 additions and 4 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
pub mod day01;
|
pub mod day01;
|
||||||
|
pub mod day02;
|
||||||
|
|
||||||
pub trait Solution {
|
pub trait Solution {
|
||||||
type Input;
|
type Input;
|
||||||
|
|
|
||||||
|
|
@ -32,13 +32,12 @@ fn run(day: usize, sol: impl Solution) {
|
||||||
fn main() {
|
fn main() {
|
||||||
let cli = cli::Cli::parse();
|
let cli = cli::Cli::parse();
|
||||||
|
|
||||||
let sol = match cli.day {
|
match cli.day {
|
||||||
1 => days::day01::Day01,
|
1 => run(cli.day, days::day01::Day01),
|
||||||
|
2 => run(cli.day, days::day02::Day02),
|
||||||
_ => {
|
_ => {
|
||||||
eprintln!("Day {:02} is not implemented yet!", cli.day);
|
eprintln!("Day {:02} is not implemented yet!", cli.day);
|
||||||
process::exit(1);
|
process::exit(1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
run(cli.day, sol);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue