#![allow(clippy::comparison_chain)]
#![allow(clippy::while_let_loop)]
#![allow(clippy::needless_range_loop)]
#![allow(dead_code)]
use std::path::PathBuf;
use clap::{Parser, Subcommand};
mod day1;
mod day2;
mod day3;
mod day4;
mod day5;
mod day6;
mod day7;
mod day8;
#[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,
},
Day5 {
#[arg(short)]
input: PathBuf,
},
Day6 {
#[arg(short)]
input: PathBuf,
},
Day7 {
#[arg(short)]
input: PathBuf,
},
Day8 {
#[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)?;
}
DayArgs::Day5 { input } => {
day5::solve(&input)?;
}
DayArgs::Day6 { input } => {
day6::solve(&input)?;
}
DayArgs::Day7 { input } => {
day7::solve(&input)?;
}
DayArgs::Day8 { input } => {
day8::solve(&input)?;
}
}
Ok(())
}