From 0d782b85656741dc7fbe636bed826e1f80c24caa Mon Sep 17 00:00:00 2001 From: MaxVerevkin Date: Sat, 9 Nov 2024 20:48:50 +0200 Subject: [PATCH] cargo clippy --fix on nightly --- src/blocks/privacy/pipewire.rs | 2 +- src/blocks/privacy/v4l.rs | 2 +- src/click.rs | 2 +- src/themes/color.rs | 2 +- src/themes/separator.rs | 2 +- src/wrappers.rs | 10 +++++----- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/blocks/privacy/pipewire.rs b/src/blocks/privacy/pipewire.rs index fac7909016..d89e7c7504 100644 --- a/src/blocks/privacy/pipewire.rs +++ b/src/blocks/privacy/pipewire.rs @@ -204,7 +204,7 @@ impl<'a> Monitor<'a> { } #[async_trait] -impl<'a> PrivacyMonitor for Monitor<'a> { +impl PrivacyMonitor for Monitor<'_> { async fn get_info(&mut self) -> Result { let client = CLIENT.as_ref().error("Could not get client")?; let data = client.data.lock().unwrap(); diff --git a/src/blocks/privacy/v4l.rs b/src/blocks/privacy/v4l.rs index c3934dd696..04d7ddd2c4 100644 --- a/src/blocks/privacy/v4l.rs +++ b/src/blocks/privacy/v4l.rs @@ -96,7 +96,7 @@ impl<'a> Monitor<'a> { } #[async_trait] -impl<'a> PrivacyMonitor for Monitor<'a> { +impl PrivacyMonitor for Monitor<'_> { async fn get_info(&mut self) -> Result { let mut mapping: PrivacyInfo = PrivacyInfo::new(); diff --git a/src/click.rs b/src/click.rs index 175d6c3cf7..5dd9d4acbf 100644 --- a/src/click.rs +++ b/src/click.rs @@ -93,7 +93,7 @@ impl<'de> Deserialize<'de> for MouseButton { { struct MouseButtonVisitor; - impl<'de> Visitor<'de> for MouseButtonVisitor { + impl Visitor<'_> for MouseButtonVisitor { type Value = MouseButton; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { diff --git a/src/themes/color.rs b/src/themes/color.rs index f6b995d7c2..f427a82ba7 100644 --- a/src/themes/color.rs +++ b/src/themes/color.rs @@ -250,7 +250,7 @@ impl<'de> Deserialize<'de> for Color { { struct ColorVisitor; - impl<'de> Visitor<'de> for ColorVisitor { + impl Visitor<'_> for ColorVisitor { type Value = Color; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { diff --git a/src/themes/separator.rs b/src/themes/separator.rs index 1ebbfc3d61..c47c684da7 100644 --- a/src/themes/separator.rs +++ b/src/themes/separator.rs @@ -31,7 +31,7 @@ impl<'de> Deserialize<'de> for Separator { { struct SeparatorVisitor; - impl<'de> Visitor<'de> for SeparatorVisitor { + impl Visitor<'_> for SeparatorVisitor { type Value = Separator; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { diff --git a/src/wrappers.rs b/src/wrappers.rs index 12e2072cb6..c898659e84 100644 --- a/src/wrappers.rs +++ b/src/wrappers.rs @@ -40,7 +40,7 @@ impl<'de, const ALLOW_ONCE: bool> Deserialize<'de> for Seconds { { struct SecondsVisitor; - impl<'de, const ALLOW_ONCE: bool> de::Visitor<'de> for SecondsVisitor { + impl de::Visitor<'_> for SecondsVisitor { type Value = Seconds; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -96,7 +96,7 @@ impl<'de> Deserialize<'de> for ShellString { { struct Visitor; - impl<'de> de::Visitor<'de> for Visitor { + impl de::Visitor<'_> for Visitor { type Value = ShellString; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -216,7 +216,7 @@ impl<'de> Deserialize<'de> for SerdeRegex { { struct Visitor; - impl<'de> de::Visitor<'de> for Visitor { + impl de::Visitor<'_> for Visitor { type Value = SerdeRegex; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { @@ -238,10 +238,10 @@ impl<'de> Deserialize<'de> for SerdeRegex { /// Display a slice. Similar to Debug impl for slice, but uses Display impl for elements. pub struct DisplaySlice<'a, T>(pub &'a [T]); -impl<'a, T: Display> Display for DisplaySlice<'a, T> { +impl Display for DisplaySlice<'_, T> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { struct DisplayAsDebug<'a, T>(&'a T); - impl<'a, T: Display> fmt::Debug for DisplayAsDebug<'a, T> { + impl fmt::Debug for DisplayAsDebug<'_, T> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fmt::Display::fmt(self.0, f) }