Fix some clippy warnings

This commit is contained in:
Lukas Kalbertodt
2022-10-24 10:17:51 +02:00
parent 0e47eb7acf
commit 337fb3204f
4 changed files with 4 additions and 4 deletions

View File

@@ -10,7 +10,7 @@ use serde::de::IntoDeserializer;
/// Semantically private, only public as it's used in the API of the `internal`
/// module. Gets converted into `ErrorKind::EnvDeserialization` before reaching
/// the real public API.
#[derive(PartialEq)]
#[derive(PartialEq, Eq)]
pub struct DeError(pub(crate) String);
impl std::error::Error for DeError {}

View File

@@ -222,7 +222,7 @@ fn format_impl(out: &mut impl Formatter, meta: &Meta, options: &FormatOptions) {
emitted_anything = true;
let comments = if options.comments { field.doc } else { &[] };
out.start_nested(&field.name, comments);
out.start_nested(field.name, comments);
format_impl(out, meta, options);
out.end_nested();
}

View File

@@ -180,7 +180,7 @@ impl fmt::Display for PrintExpr<'_> {
match entry.key {
MapKey::Str(s) if is_valid_bare_key(s) => f.write_str(s)?,
_ => PrintExpr(&entry.key.clone().into()).fmt(f)?,
_ => PrintExpr(&entry.key.into()).fmt(f)?,
}
f.write_str(" = ")?;
PrintExpr(&entry.value).fmt(f)?;

View File

@@ -197,7 +197,7 @@ impl fmt::Display for PrintExpr<'_> {
if i != 0 {
f.write_str(", ")?;
}
PrintExpr(&entry.key.clone().into()).fmt(f)?;
PrintExpr(&entry.key.into()).fmt(f)?;
f.write_str(": ")?;
PrintExpr(&entry.value).fmt(f)?;
}