mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-04 21:12:57 -05:00
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:
1 parent
216dfb83ec
commit
c3cbe1983c
1 file changed
+1
-1
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user