mod day1; mod day2; fn main() { let day = std::env::args().skip(1).next(); let result = match day.as_ref().map(|v| v.as_ref()) { Some("1a") => day1::part1(), Some("1b") => day1::part2(), Some("2a") => day2::part1(), Some("2b") => day2::part2(), _ => panic!("unrecognized day"), }; println!("[{}] {}", day.unwrap(), result); }