mirror of
https://github.com/OMGeeky/confique.git
synced 2025-12-27 06:29:27 +01:00
Fix some clippy warnings
This commit is contained in:
@@ -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 {}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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)?;
|
||||
|
||||
@@ -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)?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user