You've already forked AstralRinth
forked from didirus/AstralRinth
Fix all default clippy warnings (#480)
All trivial, fixes were for: - #[deny(clippy::if_same_then_else)] - #[warn(clippy::explicit_auto_deref)] - #[warn(clippy::bool_assert_comparison)] Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
@@ -30,7 +30,7 @@ pub fn validation_errors_to_string(
|
||||
}
|
||||
ValidationErrorsKind::List(list) => {
|
||||
if let Some((index, errors)) = list.iter().next() {
|
||||
output.push_str(&*validation_errors_to_string(
|
||||
output.push_str(&validation_errors_to_string(
|
||||
*errors.clone(),
|
||||
Some(format!(
|
||||
"of list {} with index {}",
|
||||
@@ -44,12 +44,12 @@ pub fn validation_errors_to_string(
|
||||
ValidationErrorsKind::Field(errors) => {
|
||||
if let Some(error) = errors.get(0) {
|
||||
if let Some(adder) = adder {
|
||||
output.push_str(&*format!(
|
||||
output.push_str(&format!(
|
||||
"Field {} {} failed validation with error {}",
|
||||
field, adder, error.code
|
||||
));
|
||||
} else {
|
||||
output.push_str(&*format!(
|
||||
output.push_str(&format!(
|
||||
"Field {} failed validation with error {}",
|
||||
field, error.code
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user