Resolve clippy::single-match-else warnings
- See https://rust-lang.github.io/rust-clippy/master/index.html#single_match_else - Also avoid introducing a clippy::manual-let-else warning in the process
This commit is contained in:
parent
c49631fada
commit
fe56f7fb2d
1 changed files with 3 additions and 6 deletions
|
@ -54,12 +54,9 @@ fn create_file(path: &str) -> Result<File, std::io::Error> {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
let day = match parse_args() {
|
||||
Ok(day) => day,
|
||||
Err(_) => {
|
||||
eprintln!("Need to specify a day (as integer). example: `cargo scaffold 7`");
|
||||
process::exit(1);
|
||||
}
|
||||
let Ok(day) = parse_args() else {
|
||||
eprintln!("Need to specify a day (as integer). example: `cargo scaffold 7`");
|
||||
process::exit(1);
|
||||
};
|
||||
|
||||
let day_padded = format!("{day:02}");
|
||||
|
|
Loading…
Add table
Reference in a new issue