From 7979a417fea6d8b9cd6f0ef823dd9d47543cda4d Mon Sep 17 00:00:00 2001 From: aiongg Date: Fri, 16 Oct 2026 04:21:41 +0000 Subject: [PATCH] Integration: cargo fmt --- crates/engine/src/cmd/mod.rs | 6 +----- crates/render/tests/colorize.rs | 12 +++++++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/crates/engine/src/cmd/mod.rs b/crates/engine/src/cmd/mod.rs index a1069052..d5ebeaba 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 { /// `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 { - 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 { diff --git a/crates/render/tests/colorize.rs b/crates/render/tests/colorize.rs index d00683b7..883b36b8 100644 --- a/crates/render/tests/colorize.rs +++ b/crates/render/tests/colorize.rs @@ -34,7 +34,17 @@ fn shown(file: Vec, 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)));