style(render): rustfmt CropBox condition (#2838)

This commit is contained in:
jonathanwxh-cell
2026-10-18 22:43:01 +08:00
parent c6bf3d0dbd
commit 87e68246c8
+1 -2
View File
@@ -629,8 +629,7 @@ impl<'a> Device<'a> for TextDevice {
let b = corners.iter().fold(Rect::new(f64::INFINITY, f64::INFINITY, f64::NEG_INFINITY, f64::NEG_INFINITY), |b, p| {
Rect::new(b.x0.min(p.x), b.y0.min(p.y), b.x1.max(p.x), b.y1.max(p.y))
});
let outside_crop = b.x0.max(self.page.x0) >= b.x1.min(self.page.x1)
|| b.y0.max(self.page.y0) >= b.y1.min(self.page.y1);
let outside_crop = b.x0.max(self.page.x0) >= b.x1.min(self.page.x1) || b.y0.max(self.page.y0) >= b.y1.min(self.page.y1);
if !(b.x0.is_finite() && b.y0.is_finite() && b.x1.is_finite() && b.y1.is_finite())
|| b.width() > 10_000.0
|| b.height() > 10_000.0