From e439cbb102f61f67fe6b21de0f500345fd6dc9fa Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Sun, 22 Dec 2024 00:00:02 -0500 Subject: [PATCH] Fix `clippy::needless_lifetimes` lints --- src/lib.rs | 2 +- src/selector.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 31d0a3e..3419e02 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -258,7 +258,7 @@ impl fmt::Display for StyleSheet<'_> { } } -impl<'a> Default for StyleSheet<'a> { +impl Default for StyleSheet<'_> { fn default() -> Self { Self::new() } diff --git a/src/selector.rs b/src/selector.rs index d64b4d5..11f6a41 100644 --- a/src/selector.rs +++ b/src/selector.rs @@ -22,7 +22,7 @@ pub enum AttributeOperator<'a> { StartsWith(&'a str), } -impl<'a> AttributeOperator<'a> { +impl AttributeOperator<'_> { /// Checks that value is matching the operator. pub fn matches(&self, value: &str) -> bool { match *self { @@ -355,7 +355,7 @@ pub(crate) fn parse(text: &str) -> (Option, usize) { } } -impl<'a> fmt::Display for Selector<'a> { +impl fmt::Display for Selector<'_> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { for component in &self.components { match component.combinator {