From a3ae03ba8a2cdc1e0aa74ec2edf0cf206bded7af Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 2 Dec 2026 05:11:54 -0800 Subject: [PATCH] Scripts: pass the image predicate to is_some_and directly Clippy 1.100's redundant_closure lint rejects the closure `|n| image(n)` in makes_tracing, which fails the clippy step of the gate with -D warnings. --- crates/engine/src/script/dom.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/engine/src/script/dom.rs b/crates/engine/src/script/dom.rs index 5d77bc1633..e74c56da9c 100644 --- a/crates/engine/src/script/dom.rs +++ b/crates/engine/src/script/dom.rs @@ -2858,7 +2858,7 @@ fn makes_tracing(d: &Document, parent: NodeId, id: NodeId, at: Option) -> let image = |n: &crate::doc::Node| matches!(n.kind, NodeKind::Image(_)); let rest = d.children(Some(parent)).map(|c| c.iter().filter(|n| n.id != id).collect::>()).unwrap_or_default(); match at { - Some(0) => d.node(id).is_some_and(|n| image(n)), + Some(0) => d.node(id).is_some_and(image), _ => rest.first().is_some_and(|n| image(n)), } }