mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
Simplify the raster stale-block filter for clippy's nonminimal_bool (#4314)
Clippy 1.96 flags the `retain` predicate that strips stale content blocks from pixel layers on PSD export (`clippy::nonminimal_bool`), which breaks `cargo clippy -- -D warnings` on current stable. Rewrite it as a single negated disjunction. The four terms, their order and the short-circuiting are unchanged, so the same blocks are kept and dropped.
This commit is contained in:
1 parent
97d06b240b
commit
37ee4f5a20
1 file changed
+1
-1
@@ -608,7 +608,7 @@ impl Ex {
|
||||
// pixel layers, so it stays. A vector mask (`vmsk`/`vsms`, `vogk`) stays.
|
||||
LayerContent::Raster(_) => {
|
||||
let masked = l.vector_mask.is_some();
|
||||
raw.retain(|(k, _)| !RASTER_STALE_KEYS.contains(&k) && !adjust_map::ADJUSTMENT_KEYS.contains(&k) && k != b"CgEd" && !(k == b"vstk" && masked));
|
||||
raw.retain(|(k, _)| !(RASTER_STALE_KEYS.contains(&k) || adjust_map::ADJUSTMENT_KEYS.contains(&k) || k == b"CgEd" || (k == b"vstk" && masked)));
|
||||
}
|
||||
LayerContent::Group(_) => {}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user