From 369c897d85ff2bed1d515715bced75f69800fec5 Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Thu, 22 Oct 2026 16:26:38 -0400 Subject: [PATCH] kernel, cli: clippy and the cli tests build again prism.rs's sheet regions import Surface and Vec3 only where they are built (the smlib feature), so the kernel without it has no unused imports; the cli's tests that measure meshes at their own tolerance depend on solidcraft-kernel. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017itGh5fpMEousnZ91cYcVt --- Cargo.lock | 1 + apps/solidcraft-cli/Cargo.toml | 2 ++ crates/kernel/src/prism.rs | 5 +++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 01aa3c652..2d7acdb88 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4253,6 +4253,7 @@ dependencies = [ "serde_json", "solidcraft-engine", "solidcraft-gpu", + "solidcraft-kernel", "solidcraft-mcp", ] diff --git a/apps/solidcraft-cli/Cargo.toml b/apps/solidcraft-cli/Cargo.toml index e5da188ff..e0c2523af 100644 --- a/apps/solidcraft-cli/Cargo.toml +++ b/apps/solidcraft-cli/Cargo.toml @@ -38,3 +38,5 @@ serde_json = { workspace = true } [dev-dependencies] # Snapshot tests decode the pictures to compare them with a tolerance. image = { workspace = true } +# Tests measure meshes at their own tolerances. +solidcraft-kernel = { workspace = true } diff --git a/crates/kernel/src/prism.rs b/crates/kernel/src/prism.rs index a22bce98f..4deb7ab5c 100644 --- a/crates/kernel/src/prism.rs +++ b/crates/kernel/src/prism.rs @@ -4,8 +4,7 @@ //! result's boundaries are the operands' curves, cut at their crossings and never refitted. //! Also the test of whether a record surface is a wall swept along a direction. -use solidcraft_geom::brep::Surface; -use solidcraft_geom::{Plane, Region2, Seg2, Vec2, Vec3}; +use solidcraft_geom::{Plane, Region2, Seg2, Vec2}; use crate::body::Body; use crate::{BoolOp, KernelError, Result}; @@ -111,6 +110,8 @@ struct Regions { #[cfg(feature = "smlib")] mod sheets { + use solidcraft_geom::Vec3; + use solidcraft_geom::brep::Surface; use solidcraft_geom::Loop2; use solidcraft_geom::brep::Loop; use solidcraft_smlib::{BooleanOp, Brep};