Skip to content

Commit

Permalink
fix implicit lifetime clippy warnings (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
CrockAgile authored Oct 14, 2022
1 parent 8590c8a commit 3aa208e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ mod tests {
use crate::error::Error;
use nom::{bytes::complete::tag, error::VerboseError, Err, IResult};

fn give_error_kind<'a>(input: &'a str) -> IResult<&'a str, &str, VerboseError<&'a str>> {
fn give_error_kind(input: &str) -> IResult<&str, &str, VerboseError<&str>> {
let (input, _) = tag("1234")(input)?;
let (input, res) = tag("5678")(input)?;
Ok((input, res))
Expand Down
2 changes: 1 addition & 1 deletion src/grammar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl<'gram> ParseTree<'gram> {
}

/// Iterate the "right hand side" parse tree nodes
pub fn rhs_iter<'a>(&'a self) -> impl Iterator<Item = &'a ParseTreeNode> {
pub fn rhs_iter(&self) -> impl Iterator<Item = &ParseTreeNode> {
crate::slice_iter::SliceIter { slice: &self.rhs }
}

Expand Down
2 changes: 1 addition & 1 deletion src/parsers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pub fn term_complete(input: &str) -> IResult<&str, Term, VerboseError<&str>> {
Ok((input, t))
}

pub fn expression_next<'a>(input: &'a str) -> IResult<&'a str, &str, VerboseError<&'a str>> {
pub fn expression_next(input: &str) -> IResult<&str, &str, VerboseError<&str>> {
let (input, _) = preceded(
complete::multispace0,
terminated(complete::char('|'), complete::multispace0),
Expand Down

0 comments on commit 3aa208e

Please sign in to comment.