mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-11 16:30:16 -06:00
Satisfy clippy's nonminimal_bool on rustc 1.96
Four sites already on main that `cargo xtask ci` cannot get past with the current toolchain; each rewrite is the one clippy suggests and changes no behaviour. `!x.is_some_and(f)` becomes `x.is_none_or(!f)`, and pdf_bounds folds `!(a && b) || !c` into `!(a && b && c)` by De Morgan. Unrelated to the merge they are committed beside; separated so that merge stays a merge.
This commit is contained in:
@@ -48,7 +48,7 @@ impl Bounds {
|
||||
}
|
||||
let Some(clip) = self.clips.last() else { return };
|
||||
let r = r.intersect(*clip);
|
||||
if !(r.width() > 0.0 && r.height() > 0.0) || ![r.x0, r.y0, r.x1, r.y1].iter().all(|v| v.is_finite()) {
|
||||
if !(r.width() > 0.0 && r.height() > 0.0 && [r.x0, r.y0, r.x1, r.y1].iter().all(|v| v.is_finite())) {
|
||||
return;
|
||||
}
|
||||
self.out = Some(self.out.map_or(r, |o| o.union(r)));
|
||||
|
||||
Reference in New Issue
Block a user