summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/src/collect.rs4
-rw-r--r--tests/src/run.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/src/collect.rs b/tests/src/collect.rs
index c6deba77..33f4f736 100644
--- a/tests/src/collect.rs
+++ b/tests/src/collect.rs
@@ -149,7 +149,7 @@ impl Collector {
for entry in walkdir::WalkDir::new(crate::SUITE_PATH).sort_by_file_name() {
let entry = entry.unwrap();
let path = entry.path();
- if !path.extension().is_some_and(|ext| ext == "typ") {
+ if path.extension().is_none_or(|ext| ext != "typ") {
continue;
}
@@ -168,7 +168,7 @@ impl Collector {
for entry in walkdir::WalkDir::new(crate::REF_PATH).sort_by_file_name() {
let entry = entry.unwrap();
let path = entry.path();
- if !path.extension().is_some_and(|ext| ext == "png") {
+ if path.extension().is_none_or(|ext| ext != "png") {
continue;
}
diff --git a/tests/src/run.rs b/tests/src/run.rs
index f9a3c043..4d08362c 100644
--- a/tests/src/run.rs
+++ b/tests/src/run.rs
@@ -161,7 +161,7 @@ impl<'a> Runner<'a> {
// Compare against reference output if available.
// Test that is ok doesn't need to be updated.
- if ref_data.as_ref().map_or(false, |r| D::matches(&live, r)) {
+ if ref_data.as_ref().is_ok_and(|r| D::matches(&live, r)) {
return;
}