We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a8d7f9 commit b553e03Copy full SHA for b553e03
1 file changed
src/cmp.rs
@@ -71,9 +71,7 @@ fn is_stdout_dev_null() -> bool {
71
}
72
73
pub fn parse_params<I: Iterator<Item = OsString>>(mut opts: Peekable<I>) -> Result<Params, String> {
74
- let Some(executable) = opts.next() else {
75
- return Err("Usage: <exe> <from> <to>".to_string());
76
- };
+ let executable = opts.next().ok_or("Usage: <exe> <from> <to>".to_string())?;
77
let executable_str = executable.to_string_lossy().to_string();
78
79
let parse_skip = |param: &str, skip_desc: &str| -> Result<SkipU64, String> {
0 commit comments