Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

fix(atn): simplify map_or to is_some_and to satisfy clippy (#7234)

seotarek7a9a4341a982
diff --git a/crates/engine/src/atn_cmds.rs b/crates/engine/src/atn_cmds.rs
index 6d5c34996..40af5140d 100644
--- a/crates/engine/src/atn_cmds.rs
+++ b/crates/engine/src/atn_cmds.rs
@@ -2677,7 +2677,7 @@ fn radial_blur_from(d: &Descriptor) -> Mapped {
fn radial_blur_to(_: &str, p: &Value) -> Option<Descriptor> {
let is_default_center = |k: &str| match p.get(k) {
None | Some(Value::Null) => true,
- Some(v) => v.as_f64().map_or(false, |f| f.is_finite() && (f - 0.5).abs() <= 1e-4),
+ Some(v) => v.as_f64().is_some_and(|f| f.is_finite() && (f - 0.5).abs() <= 1e-4),
};
if !is_default_center("centerX") || !is_default_center("centerY") {
return None;