Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
untitaker committed Jan 30, 2025
1 parent f9d1d85 commit c09d85a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/html/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ pub fn try_percent_decode(input: &str) -> Cow<'_, str> {
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd)]
pub struct Href<'a>(pub &'a str);

impl<'a> Href<'a> {
impl Href<'_> {
pub fn without_anchor(&self) -> Href<'_> {
let mut s = self.0;

Expand All @@ -174,7 +174,7 @@ impl<'a> Href<'a> {
}
}

impl<'a> fmt::Display for Href<'a> {
impl fmt::Display for Href<'_> {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
self.0.fmt(fmt)
}
Expand All @@ -198,7 +198,7 @@ pub enum Link<'a, P> {
Defines(DefinedLink<'a>),
}

impl<'a, P> Link<'a, P> {
impl<P> Link<'_, P> {
pub fn into_paragraph(self) -> Option<P> {
match self {
Link::Uses(UsedLink { paragraph, .. }) => paragraph,
Expand Down
4 changes: 2 additions & 2 deletions src/html/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub struct HyperlinkEmitter<'a, 'l, 'd, P: ParagraphWalker> {
pub check_anchors: bool,
}

impl<'a, 'l, 'd, P> HyperlinkEmitter<'a, 'l, 'd, P>
impl<'a, 'l, P> HyperlinkEmitter<'a, 'l, '_, P>
where
'a: 'l,
P: ParagraphWalker,
Expand Down Expand Up @@ -115,7 +115,7 @@ where
}
}

impl<'a, 'l, 'd, P> Emitter for HyperlinkEmitter<'a, 'l, 'd, P>
impl<'a, 'l, P> Emitter for HyperlinkEmitter<'a, 'l, '_, P>
where
'a: 'l,
P: ParagraphWalker,
Expand Down

0 comments on commit c09d85a

Please sign in to comment.