Skip to content

Commit

Permalink
Fix clippy lints.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcampbell24 committed Dec 2, 2024
1 parent 3e65aab commit 212bd83
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ impl<'s> From<CowStr<'s>> for AttributeValue<'s> {
}
}

impl<'s> From<String> for AttributeValue<'s> {
impl From<String> for AttributeValue<'_> {
fn from(value: String) -> Self {
Self { raw: value.into() }
}
}

impl<'s> fmt::Display for AttributeValue<'s> {
impl fmt::Display for AttributeValue<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.parts().try_for_each(|part| f.write_str(part))
}
Expand Down Expand Up @@ -475,7 +475,7 @@ impl<'s> std::ops::Deref for Attributes<'s> {
}
}

impl<'s> std::ops::DerefMut for Attributes<'s> {
impl std::ops::DerefMut for Attributes<'_> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
Expand Down Expand Up @@ -512,7 +512,7 @@ impl<'s> FromIterator<AttributeElem<'s>> for Attributes<'s> {
}
}

impl<'s> std::fmt::Debug for Attributes<'s> {
impl std::fmt::Debug for Attributes<'_> {
/// Formats the attributes using the given formatter.
///
/// # Examples
Expand Down
2 changes: 1 addition & 1 deletion src/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ enum DelimEventKind<'s> {
},
}

impl<'s> From<Opener> for DelimEventKind<'s> {
impl From<Opener> for DelimEventKind<'_> {
fn from(d: Opener) -> Self {
match d {
Opener::Span(ty) => Self::Span(ty),
Expand Down
2 changes: 1 addition & 1 deletion src/lex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ impl<'s> Lexer<'s> {
}
}

impl<'s> Iterator for Lexer<'s> {
impl Iterator for Lexer<'_> {
type Item = Token;

fn next(&mut self) -> Option<Self::Item> {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1778,7 +1778,7 @@ pub enum Container<'s> {
Mark,
}

impl<'s> Container<'s> {
impl Container<'_> {
/// Is a block element.
#[must_use]
pub fn is_block(&self) -> bool {
Expand Down

0 comments on commit 212bd83

Please sign in to comment.