Fix some clippy issues

This commit is contained in:
alex-semenyuk 2022-08-08 15:23:41 +03:00 committed by Yacin Tmimi
parent e041c20eed
commit a67d909627
2 changed files with 7 additions and 9 deletions

View File

@ -198,12 +198,10 @@ fn convert_message_format_to_rustfmt_args(
Ok(())
}
"human" => Ok(()),
_ => {
return Err(format!(
"invalid --message-format value: {}. Allowed values are: short|json|human",
message_format
));
}
_ => Err(format!(
"invalid --message-format value: {}. Allowed values are: short|json|human",
message_format
)),
}
}
@ -215,7 +213,7 @@ fn print_usage_to_stderr(reason: &str) {
.expect("failed to write to stderr");
}
#[derive(Debug, Clone, Copy, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Verbosity {
Verbose,
Normal,

View File

@ -70,9 +70,9 @@ fn mandatory_separator() {
.is_err()
);
assert!(
!Opts::command()
Opts::command()
.try_get_matches_from(&["test", "--", "--emit"])
.is_err()
.is_ok()
);
}