diff options
author | Jesse Luehrs <doy@tozt.net> | 2022-12-11 21:59:21 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2022-12-11 22:16:30 -0500 |
commit | e2d219b331a878bbb3c9dcef9ea4e218b2e3ee06 (patch) | |
tree | 93e418011c45cab8d4070d3d33b377a9364f4a27 /src/main.rs | |
parent | 179467096141b7e8f67d63b89fd21e779a564fe6 (diff) | |
download | advent-of-code-e2d219b331a878bbb3c9dcef9ea4e218b2e3ee06.tar.gz advent-of-code-e2d219b331a878bbb3c9dcef9ea4e218b2e3ee06.zip |
refactor
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index 490fa02..0000000 --- a/src/main.rs +++ /dev/null @@ -1,55 +0,0 @@ -#![allow(clippy::cognitive_complexity)] -#![allow(clippy::missing_const_for_fn)] -#![allow(clippy::similar_names)] -#![allow(clippy::struct_excessive_bools)] -#![allow(clippy::too_many_arguments)] -#![allow(clippy::too_many_lines)] -#![allow(clippy::type_complexity)] -#![allow(clippy::collapsible_else_if)] -#![allow(clippy::collapsible_if)] -#![allow(clippy::comparison_chain)] - -#[macro_use] -pub mod regex; - -pub mod graph; -pub mod grid; -pub mod parse; -pub mod prelude; -pub mod tree; - -#[path = "2020/mod.rs"] -mod year2020; -#[path = "2021/mod.rs"] -mod year2021; -#[path = "2022/mod.rs"] -mod year2022; - -#[derive(Debug, structopt::StructOpt)] -#[structopt(about = "Advent of Code")] -enum Opt { - #[structopt(name = "2020")] - Year2020 { day: u8, puzzle: u8 }, - #[structopt(name = "2021")] - Year2021 { day: u8, puzzle: u8 }, - #[structopt(name = "2022")] - Year2022 { day: u8, puzzle: u8 }, -} - -#[paw::main] -fn main(opt: Opt) { - let res = match opt { - Opt::Year2020 { day, puzzle } => crate::year2020::run(day, puzzle), - Opt::Year2021 { day, puzzle } => crate::year2021::run(day, puzzle), - Opt::Year2022 { day, puzzle } => crate::year2022::run(day, puzzle), - }; - match res { - Ok(answer) => { - println!("{}", answer); - } - Err(e) => { - eprintln!("{}", e); - std::process::exit(1); - } - } -} |