From 1940bc99e4470fa04ea6fcf08fe650865c11559d Mon Sep 17 00:00:00 2001 From: myypo Date: Sun, 6 Oct 2024 22:19:46 +0300 Subject: [PATCH] chore: clippy --- compass/src/common_types/timestamp.rs | 2 +- compass/src/config/picker.rs | 2 +- compass/src/config/picker/window_grid_size.rs | 2 +- compass/src/functions/goto/opts.rs | 2 +- compass/src/functions/pop/opts.rs | 2 +- compass/src/highlights.rs | 8 ++++---- compass/src/ui/namespace.rs | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/compass/src/common_types/timestamp.rs b/compass/src/common_types/timestamp.rs index 2ac49d2..4592c2c 100644 --- a/compass/src/common_types/timestamp.rs +++ b/compass/src/common_types/timestamp.rs @@ -14,7 +14,7 @@ impl<'de> de::Deserialize<'de> for Timestamp { { struct TimestampVisitor; - impl<'de> de::Visitor<'de> for TimestampVisitor { + impl de::Visitor<'_> for TimestampVisitor { type Value = Timestamp; fn expecting(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/compass/src/config/picker.rs b/compass/src/config/picker.rs index acd49bc..46c00e0 100644 --- a/compass/src/config/picker.rs +++ b/compass/src/config/picker.rs @@ -33,7 +33,7 @@ impl<'de> de::Deserialize<'de> for PickerConfig { { struct FieldVisitor; - impl<'de> de::Visitor<'de> for FieldVisitor { + impl de::Visitor<'_> for FieldVisitor { type Value = Field; fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/compass/src/config/picker/window_grid_size.rs b/compass/src/config/picker/window_grid_size.rs index 4b33f10..bb21304 100644 --- a/compass/src/config/picker/window_grid_size.rs +++ b/compass/src/config/picker/window_grid_size.rs @@ -21,7 +21,7 @@ impl<'de> de::Deserialize<'de> for WindowGridSize { { struct WindowGridSizeVisitor; - impl<'de> de::Visitor<'de> for WindowGridSizeVisitor { + impl de::Visitor<'_> for WindowGridSizeVisitor { type Value = WindowGridSize; fn expecting(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/compass/src/functions/goto/opts.rs b/compass/src/functions/goto/opts.rs index dd3358b..bdd102b 100644 --- a/compass/src/functions/goto/opts.rs +++ b/compass/src/functions/goto/opts.rs @@ -59,7 +59,7 @@ pub struct AbsoluteOptions { pub target: AbsoluteTarget, } -impl<'a> TryFrom> for GotoOptions { +impl TryFrom> for GotoOptions { type Error = Error; fn try_from(value: CompassArgs) -> Result { diff --git a/compass/src/functions/pop/opts.rs b/compass/src/functions/pop/opts.rs index 716e30f..e64dff1 100644 --- a/compass/src/functions/pop/opts.rs +++ b/compass/src/functions/pop/opts.rs @@ -29,7 +29,7 @@ impl Default for RelativeOptions { } } -impl<'a> TryFrom> for PopOptions { +impl TryFrom> for PopOptions { type Error = Error; fn try_from(value: CompassArgs) -> Result { diff --git a/compass/src/highlights.rs b/compass/src/highlights.rs index 62f4d65..f9e998d 100644 --- a/compass/src/highlights.rs +++ b/compass/src/highlights.rs @@ -40,7 +40,7 @@ pub struct RecordHighlightNames { pub sign: &'static str, } -impl<'a> RecordHighlightList<'a> { +impl RecordHighlightList<'_> { pub fn record_hl_names(typ: RecordMarkTime) -> RecordHighlightNames { match typ { RecordMarkTime::Past => RecordHighlightNames { @@ -63,7 +63,7 @@ impl<'a> RecordHighlightList<'a> { } } -impl<'a> Default for RecordHighlightList<'a> { +impl Default for RecordHighlightList<'_> { fn default() -> Self { Self { past: RecordHighlight { @@ -116,7 +116,7 @@ pub struct HintHighlightNames { pub path: &'static str, } -impl<'a> HintHighlightList<'a> { +impl HintHighlightList<'_> { pub fn hint_hl_names(typ: GridLayout) -> HintHighlightNames { match typ { GridLayout::Open => HintHighlightNames { @@ -131,7 +131,7 @@ impl<'a> HintHighlightList<'a> { } } -impl<'a> Default for HintHighlightList<'a> { +impl Default for HintHighlightList<'_> { fn default() -> Self { Self { open: HintHighlight { diff --git a/compass/src/ui/namespace.rs b/compass/src/ui/namespace.rs index 09305d5..aa93cff 100644 --- a/compass/src/ui/namespace.rs +++ b/compass/src/ui/namespace.rs @@ -24,7 +24,7 @@ impl<'de> de::Deserialize<'de> for Namespace { { struct NamespaceVisitor; - impl<'de> de::Visitor<'de> for NamespaceVisitor { + impl de::Visitor<'_> for NamespaceVisitor { type Value = Namespace; fn expecting(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {