Skip to content

Commit

Permalink
chore: fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
vthib committed Nov 9, 2023
1 parent 5b5beb8 commit 7a53370
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion boreal-parser/src/expression/for_expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ fn for_expression_kind(input: Input) -> ParseResult<ForExprKind> {
preceded(rtrim(ttag("at")), cut(primary_expression)),
|expr| ForExprKind::At(Box::new(expr)),
),
map(success(()), |_| ForExprKind::None),
map(success(()), |()| ForExprKind::None),
))(input)
}

Expand Down
2 changes: 1 addition & 1 deletion boreal-parser/src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<YaraFile> {
let (mut input, _) = ltrim(input)?;
let (mut input, ()) = ltrim(input)?;

let mut file = YaraFile {
components: Vec::new(),
Expand Down
2 changes: 1 addition & 1 deletion boreal-parser/src/nom_recipes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down
2 changes: 1 addition & 1 deletion boreal/src/module/pe/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7a53370

Please sign in to comment.