Skip to content

Commit 6a044a7

Browse files
committed
tweak unrecognized arguments error message
1 parent f51773b commit 6a044a7

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/cli.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -211,14 +211,10 @@ fn readable_pico_error(error: pico::Error) -> Error {
211211
format!("'{}' isn't a valid value ({})", value, cause)
212212
}
213213
Error::OptionWithoutAValue(_) => "missing value".to_string(),
214-
Error::UnusedArgsLeft(left) => {
215-
let plural = if left.len() > 1 { "were" } else { "was" };
216-
format!(
217-
"error parsing arguments: {} {} not recognized",
218-
left.join(", "),
219-
plural
220-
)
221-
}
214+
Error::UnusedArgsLeft(left) => format!(
215+
"error, unrecognized arguments: {}",
216+
left.join(", ")
217+
),
222218
Error::NonUtf8Argument => "not a valid utf8 value".to_string(),
223219
})
224220
}

0 commit comments

Comments
 (0)