Skip to content

Commit

Permalink
Fix clippy::needless_lifetimes lints
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys committed Dec 6, 2024
1 parent 6ab87c8 commit f139656
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ pub enum ParseError<'text> {
AmbiguousMatch(Token<'text>, Vec<Rc<Node>>),
}

impl<'text> fmt::Debug for ParseError<'text> {
impl fmt::Debug for ParseError<'_> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ParseError::NoMatches(token, _) => write!(f, "NoMatches({token:?}, ...)"),
Expand All @@ -354,7 +354,7 @@ impl<'text> fmt::Debug for ParseError<'text> {
}
}

impl<'text> Error for ParseError<'text> {
impl Error for ParseError<'_> {
fn description(&self) -> &str {
match *self {
ParseError::NoMatches(_, _) => "No match.",
Expand All @@ -363,7 +363,7 @@ impl<'text> Error for ParseError<'text> {
}
}

impl<'text> fmt::Display for ParseError<'text> {
impl fmt::Display for ParseError<'_> {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
self.description().fmt(f)
}
Expand Down

0 comments on commit f139656

Please sign in to comment.