DEVELOPMENT ENVIRONMENT

~liljamo/aoc2024

ref: f0ad4ff4a1b8467ca6a2999b70edf8d37db5de1f aoc2024/src/main.rs -rw-r--r-- 480 bytes
f0ad4ff4Jonni Liljamo feat: day1 a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
use std::path::PathBuf;

use clap::{Parser, Subcommand};

mod day1;

#[derive(Parser)]
struct Args {
    #[command(subcommand)]
    day: DayArgs,
}

#[derive(Subcommand)]
enum DayArgs {
    Day1 {
        #[arg(short, default_value = "./input/day1/example")]
        input: PathBuf,
    },
}

fn main() -> anyhow::Result<()> {
    let args = Args::parse();

    match args.day {
        DayArgs::Day1 { input } => {
            day1::solve(&input)?;
        }
    }

    Ok(())
}