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.
This commit is contained in:
dotCooCoo committed 2026-12-02 05:11:54 -08:00
1 parent 47a8bcde18
commit a3ae03ba8a
1 file changed
+1 -1
+1 -1
View File
@@ -2858,7 +2858,7 @@ fn makes_tracing(d: &Document, parent: NodeId, id: NodeId, at: Option<usize>) ->
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::<Vec<_>>()).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)),
}
}