Skip to content

Commit 4b0fb12

Browse files
committed
fix: clippy
Signed-off-by: Dmitry Dygalo <[email protected]>
1 parent 21c2e21 commit 4b0fb12

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

css-inline/src/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl Display for InlineError {
6464

6565
impl From<(ParseError<'_, ()>, &str)> for InlineError {
6666
fn from(error: (ParseError<'_, ()>, &str)) -> Self {
67-
return match error.0.kind {
67+
match error.0.kind {
6868
ParseErrorKind::Basic(kind) => match kind {
6969
BasicParseErrorKind::UnexpectedToken(token) => {
7070
Self::ParseError(Cow::Owned(format!("Unexpected token: {token:?}")))
@@ -81,6 +81,6 @@ impl From<(ParseError<'_, ()>, &str)> for InlineError {
8181
}
8282
},
8383
ParseErrorKind::Custom(()) => Self::ParseError(Cow::Borrowed("Unknown error")),
84-
};
84+
}
8585
}
8686
}

css-inline/src/html/element.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ impl<'a> Element<'a> {
105105
}
106106
}
107107

108-
impl<'a> selectors::Element for Element<'a> {
108+
impl selectors::Element for Element<'_> {
109109
type Impl = InlinerSelectors;
110110

111111
#[inline]

css-inline/src/html/iter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ pub(crate) struct Select<'a, 'c> {
3030
selectors: Selectors,
3131
}
3232

33-
impl<'a, 'c> Select<'a, 'c> {
33+
impl Select<'_, '_> {
3434
/// Specificity of the first selector in the list of selectors.
3535
#[inline]
3636
pub(crate) fn specificity(&self) -> Specificity {
3737
Specificity::new(self.selectors.0[0].specificity())
3838
}
3939
}
4040

41-
impl<'a, 'c> Iterator for Select<'a, 'c> {
41+
impl<'a> Iterator for Select<'a, '_> {
4242
type Item = Element<'a>;
4343

4444
#[inline]

css-inline/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub struct InlineOptions<'a> {
8080
pub resolver: Arc<dyn StylesheetResolver>,
8181
}
8282

83-
impl<'a> std::fmt::Debug for InlineOptions<'a> {
83+
impl std::fmt::Debug for InlineOptions<'_> {
8484
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
8585
let mut debug = f.debug_struct("InlineOptions");
8686
debug

css-inline/src/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fn exhaust<'i>(input: &mut cssparser::Parser<'i, '_>) -> &'i str {
2222
/// Parser for qualified rules - a prelude + a simple {} block.
2323
///
2424
/// Usually these rules are a selector + list of declarations: `p { color: blue; font-size: 2px }`
25-
impl<'d, 'i> cssparser::QualifiedRuleParser<'i> for CSSRuleListParser<'d, 'i> {
25+
impl<'i> cssparser::QualifiedRuleParser<'i> for CSSRuleListParser<'_, 'i> {
2626
type Prelude = &'i str;
2727
type QualifiedRule = QualifiedRule<'i>;
2828
type Error = ();
@@ -66,7 +66,7 @@ impl<'i> cssparser::DeclarationParser<'i> for CSSDeclarationListParser {
6666
}
6767
}
6868

69-
impl<'d, 'i> cssparser::AtRuleParser<'i> for CSSRuleListParser<'d, 'i> {
69+
impl<'i> cssparser::AtRuleParser<'i> for CSSRuleListParser<'_, 'i> {
7070
type Prelude = &'i str;
7171
type AtRule = QualifiedRule<'i>;
7272
type Error = ();

0 commit comments

Comments
 (0)