21 lines
395 B
Rust
21 lines
395 B
Rust
mod utils;
|
|
use std::env;
|
|
|
|
mod year_2023;
|
|
|
|
fn main() {
|
|
// Parse command-line arguments
|
|
let args: Vec<String> = env::args().collect();
|
|
|
|
if args.len() != 3 {
|
|
panic!("Usage: {} <year> <day>", args[0]);
|
|
}
|
|
|
|
let year = &args[1];
|
|
let day = &args[2];
|
|
|
|
match year.as_str() {
|
|
"2023" => year_2023::run(day),
|
|
_ => panic!("Invalid year specified"),
|
|
};
|
|
} |