You've already forked AstralRinth
forked from didirus/AstralRinth
chore(clippy): enable and fix many stricter lints (#3783)
* chore(clippy): enable and fix many stricter lints These ensure that the codebase uses more idiomatic, performant, and concise language constructions. * chore: make non-Clippy compiler warnings also deny by default
This commit is contained in:
committed by
GitHub
parent
301967d204
commit
f84f8c1c2b
@@ -1,4 +1,4 @@
|
||||
use std::sync::LazyLock;
|
||||
use std::{fmt::Write, sync::LazyLock};
|
||||
|
||||
use itertools::Itertools;
|
||||
use regex::Regex;
|
||||
@@ -44,15 +44,17 @@ pub fn validation_errors_to_string(
|
||||
ValidationErrorsKind::Field(errors) => {
|
||||
if let Some(error) = errors.first() {
|
||||
if let Some(adder) = adder {
|
||||
output.push_str(&format!(
|
||||
"Field {} {} failed validation with error: {}",
|
||||
field, adder, error.code
|
||||
));
|
||||
write!(
|
||||
&mut output,
|
||||
"Field {field} {adder} failed validation with error: {}",
|
||||
error.code
|
||||
).unwrap();
|
||||
} else {
|
||||
output.push_str(&format!(
|
||||
"Field {} failed validation with error: {}",
|
||||
field, error.code
|
||||
));
|
||||
write!(
|
||||
&mut output,
|
||||
"Field {field} failed validation with error: {}",
|
||||
error.code
|
||||
).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user