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 day02;
|
||||
|
||||
pub trait Solution {
|
||||
type Input;
|
||||
|
|
|
|||
|
|
@ -32,13 +32,12 @@ fn run(day: usize, sol: impl Solution) {
|
|||
fn main() {
|
||||
let cli = cli::Cli::parse();
|
||||
|
||||
let sol = match cli.day {
|
||||
1 => days::day01::Day01,
|
||||
match cli.day {
|
||||
1 => run(cli.day, days::day01::Day01),
|
||||
2 => run(cli.day, days::day02::Day02),
|
||||
_ => {
|
||||
eprintln!("Day {:02} is not implemented yet!", cli.day);
|
||||
process::exit(1);
|
||||
}
|
||||
};
|
||||
|
||||
run(cli.day, sol);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue