Skip to content

Commit

Permalink
clippy: Option::is_some_and
Browse files Browse the repository at this point in the history
  • Loading branch information
sourcefrog committed Jan 3, 2025
1 parent 90c15ac commit b36ed52
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,14 @@ impl Options {
/// That is: it matches the examine globset (if specified) and does not match the exclude globset
/// (if specified).
pub fn allows_source_file_path(&self, path: &Utf8Path) -> bool {
// TODO: Use Option::is_none_or when MSRV>1.80
self.examine_globset
.as_ref()
.map_or(true, |g| g.is_match(path))
&& !self
.exclude_globset
.as_ref()
.map_or(false, |g| g.is_match(path))
.is_some_and(|g| g.is_match(path))
}

/// True if the options allow this mutant to be tested.
Expand Down

0 comments on commit b36ed52

Please sign in to comment.