DesignCraft: An open-source page and layout design editor written by scratch in pure Rust
Integration: cargo fmt
aiongg7979a417fea6
diff --git a/crates/engine/src/cmd/mod.rs b/crates/engine/src/cmd/mod.rsindex a1069052a..d5ebeaba8 100644--- a/crates/engine/src/cmd/mod.rs+++ b/crates/engine/src/cmd/mod.rs@@ -276,11 +276,7 @@ pub(crate) fn point_param(p: &Value, key: &str) -> Option<Point> {/// `r`, computed from coordinate params, or an error when a value overflowed to infinity or NaN:/// a document holding one can't be saved (#1050).pub(crate) fn finite_rect(command: &str, r: Rect) -> Result<Rect> {- if [r.x0, r.y0, r.x1, r.y1].iter().all(|v| v.is_finite()) {- Ok(r)- } else {- Err(bad(command, "the position and size must stay finite numbers"))- }+ if [r.x0, r.y0, r.x1, r.y1].iter().all(|v| v.is_finite()) { Ok(r) } else { Err(bad(command, "the position and size must stay finite numbers")) }}pub(crate) fn rect_param(p: &Value, key: &str) -> Option<Rect> {diff --git a/crates/render/tests/colorize.rs b/crates/render/tests/colorize.rsindex d00683b7c..883b36b8e 100644--- a/crates/render/tests/colorize.rs+++ b/crates/render/tests/colorize.rs@@ -34,7 +34,17 @@ fn shown(file: Vec<u8>, fill: Fill) -> Vec<[u8; 4]> {let aid = AssetId(d.alloc());d.assets.insert(aid,- Arc::new(Asset { page: 0, id: aid, name: "a".into(), mime: "image/png".into(), link: None, data: Arc::new(file), pixels: Some((3, 1)), pdf_crop: Default::default(), pdf_box: None }),+ Arc::new(Asset {+ page: 0,+ id: aid,+ name: "a".into(),+ mime: "image/png".into(),+ link: None,+ data: Arc::new(file),+ pixels: Some((3, 1)),+ pdf_crop: Default::default(),+ pdf_box: None,+ }),);let id = ItemId(d.alloc());let mut it = Item::new(id, d.default_layer(), Shape::Rectangle, shapes::rectangle(Rect::new(100.0, 100.0, 250.0, 150.0)));