mod cli; mod dice; mod random_tables; fn main() { let matches = cli::cli().get_matches(); match matches.subcommand() { Some(("roll", sub_matches)) => { match dice::roll_formula(sub_matches.get_one::("FORMULA").expect("required")) { Some(result) => println!("Rolled: {}", result), None => eprintln!("Error: Invalid roll formula or calculation failed.") } } _ => unreachable!() } }