mirror of
https://github.com/OMGeeky/confique.git
synced 2026-02-23 15:38:30 +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`
|
/// Semantically private, only public as it's used in the API of the `internal`
|
||||||
/// module. Gets converted into `ErrorKind::EnvDeserialization` before reaching
|
/// module. Gets converted into `ErrorKind::EnvDeserialization` before reaching
|
||||||
/// the real public API.
|
/// the real public API.
|
||||||
#[derive(PartialEq)]
|
#[derive(PartialEq, Eq)]
|
||||||
pub struct DeError(pub(crate) String);
|
pub struct DeError(pub(crate) String);
|
||||||
|
|
||||||
impl std::error::Error for DeError {}
|
impl std::error::Error for DeError {}
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ fn format_impl(out: &mut impl Formatter, meta: &Meta, options: &FormatOptions) {
|
|||||||
emitted_anything = true;
|
emitted_anything = true;
|
||||||
|
|
||||||
let comments = if options.comments { field.doc } else { &[] };
|
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);
|
format_impl(out, meta, options);
|
||||||
out.end_nested();
|
out.end_nested();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ impl fmt::Display for PrintExpr<'_> {
|
|||||||
|
|
||||||
match entry.key {
|
match entry.key {
|
||||||
MapKey::Str(s) if is_valid_bare_key(s) => f.write_str(s)?,
|
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(" = ")?;
|
f.write_str(" = ")?;
|
||||||
PrintExpr(&entry.value).fmt(f)?;
|
PrintExpr(&entry.value).fmt(f)?;
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ impl fmt::Display for PrintExpr<'_> {
|
|||||||
if i != 0 {
|
if i != 0 {
|
||||||
f.write_str(", ")?;
|
f.write_str(", ")?;
|
||||||
}
|
}
|
||||||
PrintExpr(&entry.key.clone().into()).fmt(f)?;
|
PrintExpr(&entry.key.into()).fmt(f)?;
|
||||||
f.write_str(": ")?;
|
f.write_str(": ")?;
|
||||||
PrintExpr(&entry.value).fmt(f)?;
|
PrintExpr(&entry.value).fmt(f)?;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user