From 240cd21de5b8b506f34dc8fdfbcaf49a73fb91c9 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 2 Dec 2024 10:40:19 -0600 Subject: [PATCH] style: Make clippy happy --- src/fmt/humantime.rs | 2 +- src/fmt/kv.rs | 2 +- src/fmt/mod.rs | 4 ++-- src/logger.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/fmt/humantime.rs b/src/fmt/humantime.rs index 2e77bff..3a570ba 100644 --- a/src/fmt/humantime.rs +++ b/src/fmt/humantime.rs @@ -85,7 +85,7 @@ impl fmt::Debug for Timestamp { /// A `Debug` wrapper for `Timestamp` that uses the `Display` implementation. struct TimestampValue<'a>(&'a Timestamp); - impl<'a> fmt::Debug for TimestampValue<'a> { + impl fmt::Debug for TimestampValue<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fmt::Display::fmt(&self.0, f) } diff --git a/src/fmt/kv.rs b/src/fmt/kv.rs index 55f3bea..cbb7dae 100644 --- a/src/fmt/kv.rs +++ b/src/fmt/kv.rs @@ -41,7 +41,7 @@ pub fn default_kv_format(formatter: &mut Formatter, fields: &dyn Source) -> io:: struct DefaultVisitSource<'a>(&'a mut Formatter); -impl<'a, 'kvs> VisitSource<'kvs> for DefaultVisitSource<'a> { +impl<'kvs> VisitSource<'kvs> for DefaultVisitSource<'_> { fn visit_pair(&mut self, key: Key<'_>, value: Value<'kvs>) -> Result<(), Error> { write!(self.0, " {}={}", self.style_key(key), value)?; Ok(()) diff --git a/src/fmt/mod.rs b/src/fmt/mod.rs index c495eb5..7605ef9 100644 --- a/src/fmt/mod.rs +++ b/src/fmt/mod.rs @@ -317,7 +317,7 @@ struct DefaultFormat<'a> { kv_format: &'a KvFormatFn, } -impl<'a> DefaultFormat<'a> { +impl DefaultFormat<'_> { fn write(mut self, record: &Record<'_>) -> io::Result<()> { self.write_timestamp()?; self.write_level(record)?; @@ -454,7 +454,7 @@ impl<'a> DefaultFormat<'a> { indent_count: usize, } - impl<'a, 'b> Write for IndentWrapper<'a, 'b> { + impl Write for IndentWrapper<'_, '_> { fn write(&mut self, buf: &[u8]) -> io::Result { let mut first = true; for chunk in buf.split(|&x| x == b'\n') { diff --git a/src/logger.rs b/src/logger.rs index 3895f60..b7a4642 100644 --- a/src/logger.rs +++ b/src/logger.rs @@ -806,7 +806,7 @@ where } } -impl<'a> Default for Env<'a> { +impl Default for Env<'_> { fn default() -> Self { Env { filter: Var::new(DEFAULT_FILTER_ENV),