We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c809cf5 commit 5d6fceaCopy full SHA for 5d6fcea
src/main.rs
@@ -112,11 +112,11 @@ fn main() -> sysexits::ExitCode {
112
}
113
};
114
let is_verbose = matches.opt_present("verbose");
115
- let max_diff_hours: u32 = match matches.opt_str("duration").map(|str| str.parse()) {
+ let max_diff_hours = match matches.opt_str("duration").map(|str| str.parse::<u32>()) {
116
None => 3,
117
Some(Ok(it)) => it,
118
- Some(Err(_)) => {
119
- eprintln!("Duration must be an integer value!");
+ Some(Err(error)) => {
+ eprintln!("Invalid duration: {error}!");
120
return sysexits::ExitCode::Usage;
121
122
0 commit comments