#![allow(clippy::comparison_chain)]
#![allow(clippy::while_let_loop)]
#![allow(clippy::needless_range_loop)]
use std::path::PathBuf;
use clap::{Parser, Subcommand};
mod day1;
mod day2;
mod day3;
mod day4;
#[derive(Parser)]
struct Args {
#[command(subcommand)]
day: DayArgs,
}
#[derive(Subcommand)]
enum DayArgs {
Day1 {
#[arg(short)]
input: PathBuf,
},
Day2 {
#[arg(short)]
input: PathBuf,
},
Day3 {
#[arg(short)]
input: PathBuf,
},
Day4 {
#[arg(short)]
input: PathBuf,
},
}
fn main() -> anyhow::Result<()> {
let args = Args::parse();
match args.day {
DayArgs::Day1 { input } => {
day1::solve(&input)?;
}
DayArgs::Day2 { input } => {
day2::solve(&input)?;
}
DayArgs::Day3 { input } => {
day3::solve(&input)?;
}
DayArgs::Day4 { input } => {
day4::solve(&input)?;
}
}
Ok(())
}