PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust
style(render): rustfmt CropBox condition (#2838)
jonathanwxh-cell87e68246c892
diff --git a/crates/render/src/text.rs b/crates/render/src/text.rsindex d4066ec14..08e50ae37 100644--- a/crates/render/src/text.rs+++ b/crates/render/src/text.rs@@ -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