diff --git a/boreal-parser/src/expression/for_expression.rs b/boreal-parser/src/expression/for_expression.rs index 37b411fd..3ad29357 100644 --- a/boreal-parser/src/expression/for_expression.rs +++ b/boreal-parser/src/expression/for_expression.rs @@ -150,7 +150,7 @@ fn for_expression_kind(input: Input) -> ParseResult { preceded(rtrim(ttag("at")), cut(primary_expression)), |expr| ForExprKind::At(Box::new(expr)), ), - map(success(()), |_| ForExprKind::None), + map(success(()), |()| ForExprKind::None), ))(input) } diff --git a/boreal-parser/src/file.rs b/boreal-parser/src/file.rs index 0a5c82dd..d8218ce6 100644 --- a/boreal-parser/src/file.rs +++ b/boreal-parser/src/file.rs @@ -64,7 +64,7 @@ pub struct Include { /// If the input cannot be parsed properly and entirely as a list /// of yara rules, an error is returned. pub(crate) fn parse_yara_file(input: Input) -> ParseResult { - let (mut input, _) = ltrim(input)?; + let (mut input, ()) = ltrim(input)?; let mut file = YaraFile { components: Vec::new(), diff --git a/boreal-parser/src/nom_recipes.rs b/boreal-parser/src/nom_recipes.rs index 2643a8c5..c88b5635 100644 --- a/boreal-parser/src/nom_recipes.rs +++ b/boreal-parser/src/nom_recipes.rs @@ -41,7 +41,7 @@ pub(crate) fn ltrim(mut input: Input) -> ParseResult<()> { value((), multispace1), ))(input) { - Ok((i, _)) => input = i, + Ok((i, ())) => input = i, Err(nom::Err::Error(_)) => return Ok((input, ())), err @ Err(_) => return err, } diff --git a/boreal/src/module/pe/debug.rs b/boreal/src/module/pe/debug.rs index f487afc4..0b2a07bc 100644 --- a/boreal/src/module/pe/debug.rs +++ b/boreal/src/module/pe/debug.rs @@ -41,7 +41,7 @@ pub fn pdb_path(data_dirs: &DataDirectories, mem: &[u8], sections: &SectionTable let mut info = Bytes(info); let sig = match info.read_bytes(4) { Ok(v) => v.0, - Err(_) => continue, + Err(()) => continue, }; let pdb_path_offset = match sig {