File formats: pass the path check to is_some_and directly

Clippy 1.100 denies the closure around `same` in the converting-file
check of `open.rs` as `redundant_closure`, which stopped the clippy step
of `cargo xtask ci`. The check now passes `&same`; behavior is unchanged.
This commit is contained in:
dotCooCoo committed 2026-12-03 23:31:45 -08:00
1 parent 216dfb83ec
commit c3cbe1983c
1 file changed
+1 -1
+1 -1
View File
@@ -641,7 +641,7 @@ fn open_file_with(app: &mut VectorcraftApp, path: &str, background: bool, p: &Va
if let Some(r) = try_activate_open_document(app, path, canonical.as_deref())? {
return Ok(r);
}
if app.opening.pending.iter().any(|p| same(&p.path)) || app.opening.converting.iter().any(|c| c.path.as_deref().is_some_and(|p| same(p))) {
if app.opening.pending.iter().any(|p| same(&p.path)) || app.opening.converting.iter().any(|c| c.path.as_deref().is_some_and(&same)) {
return Ok(Value::Null);
}
// A shortcut set is read by Import Shortcut Set, up to its reader's cap.