refactor: fix most pedantic clippy warnings

closes #29

Co-authored-by: Andy Pymont <andypymont@gmail.com>
This commit is contained in:
Felix Spöttel
2023-10-31 19:46:31 +01:00
parent f46d1e209c
commit d7af3dca9e
10 changed files with 107 additions and 114 deletions

View File

@@ -1,14 +1,14 @@
use crate::template::aoc_cli;
use std::process;
pub fn download_handler(day: u8) {
pub fn handle(day: u8) {
if aoc_cli::check().is_err() {
eprintln!("command \"aoc\" not found or not callable. Try running \"cargo install aoc-cli\" to install it.");
process::exit(1);
}
if let Err(e) = aoc_cli::download(day) {
eprintln!("failed to call aoc-cli: {}", e);
eprintln!("failed to call aoc-cli: {e}");
process::exit(1);
};
}