SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
Format and clippy
bherbruck143435dc1cc6
diff --git a/crates/ui-egui/src/control.rs b/crates/ui-egui/src/control.rsindex a659f9b0fc..204b147198 100644--- a/crates/ui-egui/src/control.rs+++ b/crates/ui-egui/src/control.rs@@ -208,7 +208,10 @@ pub(crate) fn view_scene(app: &SolveApp, guides: solidcraft_engine::view::Guides/// The grid and the origin's axes as the window shows them (the Grid and Origin switches).pub(crate) fn window_guides(app: &SolveApp) -> solidcraft_engine::view::Guides {- solidcraft_engine::view::Guides { grid: app.session.active_sketch.is_some() || (app.ui.show_grid && !crate::viewport::active_view(app).hide_grid), axes: app.origin_visible() }+ solidcraft_engine::view::Guides {+ grid: app.session.active_sketch.is_some() || (app.ui.show_grid && !crate::viewport::active_view(app).hide_grid),+ axes: app.origin_visible(),+ }}/// A picture of the view as the window shows it, RGBA, drawn on the GPU with the viewport'sdiff --git a/crates/ui-egui/src/viewport.rs b/crates/ui-egui/src/viewport.rsindex 0ee2885eed..9f1eb83205 100644--- a/crates/ui-egui/src/viewport.rs+++ b/crates/ui-egui/src/viewport.rs@@ -6293,7 +6293,8 @@ mod grid_plane_tests {let under = grid(&app);assert!(!under.is_empty(), "the open sketch shows a grid (follows the view: {follows})");// Each line is 32 bytes: two f32 points, a colour and a width; the XZ plane is Y = 0.- let ys: Vec<f32> = under.chunks_exact(32).flat_map(|l| [&l[4..8], &l[16..20]]).map(|b| f32::from_le_bytes(b.try_into().unwrap())).collect();+ let ys: Vec<f32> =+ under.as_chunks::<32>().0.iter().flat_map(|l| [&l[4..8], &l[16..20]]).map(|b| f32::from_le_bytes(b.try_into().unwrap())).collect();assert!(ys.iter().all(|y| y.abs() < 1e-3), "the grid lies on the sketch plane");}app.ui.show_grid = true;