diff --git a/src/app/commands.rs b/src/app/commands.rs index 55e301bb7..f7780309b 100644 --- a/src/app/commands.rs +++ b/src/app/commands.rs @@ -1204,7 +1204,7 @@ impl OpenCADStudio { let cam_rot = self.tabs[i].scene.camera.borrow().rotation; let right = cam_rot * glam::Vec3::X; let view_twist = right.y.atan2(right.x) as f64; - let new_cmd = TorientCommand::new(handles, entities, view_twist); + let new_cmd = TorientCommand::new(entities, view_twist); self.command_line.push_info(&new_cmd.prompt()); self.tabs[i].active_cmd = Some(Box::new(new_cmd)); } diff --git a/src/app/style_ops.rs b/src/app/style_ops.rs index 1d56f8550..430726192 100644 --- a/src/app/style_ops.rs +++ b/src/app/style_ops.rs @@ -47,7 +47,7 @@ impl OpenCADStudio { /// sorted by name so the `HashMap` backing them renders stably). pub(super) fn style_names(&self, kind: StyleKind) -> Vec { let doc = &self.tabs[self.active_tab].scene.document; - let mut from_objects = |pick: fn(&ObjectType) -> Option<&str>| -> Vec { + let from_objects = |pick: fn(&ObjectType) -> Option<&str>| -> Vec { let mut v: Vec = doc .objects .values() diff --git a/src/app/update.rs b/src/app/update.rs index 29f701276..e71ef96bd 100644 --- a/src/app/update.rs +++ b/src/app/update.rs @@ -1677,7 +1677,6 @@ impl OpenCADStudio { // buffer to the same submit path so typing a command name (or // an option keyword like "R") and pressing Enter works without // first clicking into the command line (issue #99). - let i = self.active_tab; if !self.command_line.input.trim().is_empty() { return self.update(Message::CommandSubmit); } diff --git a/src/command/mod.rs b/src/command/mod.rs index 1606fcb58..c82b7d1bb 100644 --- a/src/command/mod.rs +++ b/src/command/mod.rs @@ -379,6 +379,7 @@ pub enum DynAnchor { pub struct DynFieldSpec { pub role: DynRole, /// Label override; `None` uses the role's default label. + #[allow(dead_code)] // dyn-spec framework field; not yet consumed pub label: Option<&'static str>, } diff --git a/src/io/mod.rs b/src/io/mod.rs index 6226e58aa..da1f9a4c0 100644 --- a/src/io/mod.rs +++ b/src/io/mod.rs @@ -361,6 +361,7 @@ pub fn save(doc: &CadDocument, path: &Path) -> Result<(), String> { /// `doc.version`). Used by the web build, which hands the bytes to a browser /// download instead of writing a path — the byte-buffer counterpart to /// [`save_as_version`]. +#[allow(dead_code)] // web/wasm build only; unused in the native target pub fn save_to_bytes( doc: &CadDocument, ext: &str, diff --git a/src/modules/draw/clipboard/paste.rs b/src/modules/draw/clipboard/paste.rs index 669ab42f6..b623a6c0c 100644 --- a/src/modules/draw/clipboard/paste.rs +++ b/src/modules/draw/clipboard/paste.rs @@ -1,6 +1,6 @@ // Paste tool — ribbon definition + CadCommand implementation. -use crate::modules::{IconKind, ModuleEvent, ToolDef}; +use crate::modules::IconKind; /// Shared icon for the Paste button and its dropdown entries. pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../../assets/icons/paste.svg")); @@ -13,15 +13,6 @@ pub const MENU_ITEMS: &[(&str, &str, IconKind)] = &[ ("PASTEBLOCK", "Paste as Block", ICON), ]; -pub fn tool() -> ToolDef { - ToolDef { - id: "PASTECLIP", - label: "Paste", - icon: ICON, - event: ModuleEvent::Command("PASTECLIP".to_string()), - } -} - // ── CadCommand implementation ───────────────────────────────────────────── use acadrust::Handle; diff --git a/src/modules/draw/modify/torient.rs b/src/modules/draw/modify/torient.rs index d0359940a..4bf0f5111 100644 --- a/src/modules/draw/modify/torient.rs +++ b/src/modules/draw/modify/torient.rs @@ -9,7 +9,6 @@ use acadrust::Handle; use glam::Vec3; use crate::command::{CadCommand, CmdResult, DynField}; -use crate::modules::{IconKind, ModuleEvent, ToolDef}; use crate::scene::model::wire_model::WireModel; use acadrust::EntityType; @@ -21,16 +20,14 @@ enum Step { } pub struct TorientCommand { - handles: Vec, entities: Vec<(Handle, EntityType)>, view_twist: f64, step: Step, } impl TorientCommand { - pub fn new(handles: Vec, entities: Vec<(Handle, EntityType)>, view_twist: f64) -> Self { + pub fn new(entities: Vec<(Handle, EntityType)>, view_twist: f64) -> Self { Self { - handles, entities, view_twist, step: Step::AngleOrFirstPoint, diff --git a/src/plugin/external.rs b/src/plugin/external.rs index 3b059fcbd..3d67f0518 100644 --- a/src/plugin/external.rs +++ b/src/plugin/external.rs @@ -47,6 +47,7 @@ impl ExternalPlugin { /// True when the package can be loaded today: compatible API *and* a native /// library present for this platform. + #[allow(dead_code)] // plugin-host surface (issue #100); not yet wired pub fn loadable(&self) -> bool { self.api_compatible() && self.lib_present } diff --git a/src/scene/model/wire_model.rs b/src/scene/model/wire_model.rs index 6ab655be4..168e490ef 100644 --- a/src/scene/model/wire_model.rs +++ b/src/scene/model/wire_model.rs @@ -79,8 +79,10 @@ impl WireModel { pub const WHITE: [f32; 4] = [1.00, 1.00, 1.00, 1.0]; pub const CYAN: [f32; 4] = [0.25, 0.85, 1.00, 1.0]; pub const SELECTED: [f32; 4] = [0.15, 0.55, 1.00, 1.0]; - /// Civil 3D-style object acquisition highlight (structure / catchment hover). + /// Object-acquisition highlight (structure / catchment hover); not yet wired. + #[allow(dead_code)] pub const PICK_HIGHLIGHT: [f32; 4] = [0.95, 0.50, 0.08, 1.0]; + #[allow(dead_code)] pub const PICK_HIGHLIGHT_DIM: [f32; 4] = [0.95, 0.50, 0.08, 0.45]; /// Sentinel AABB that never rejects any snap query. pub const UNBOUNDED_AABB: [f32; 4] = [ diff --git a/src/ui/color_select.rs b/src/ui/color_select.rs index 973335cca..a63bc70f6 100644 --- a/src/ui/color_select.rs +++ b/src/ui/color_select.rs @@ -407,7 +407,7 @@ impl<'a> Widget for Floating<'a> { &'b mut self, tree: &'b mut widget::Tree, layout: Layout<'b>, - renderer: &Renderer, + _renderer: &Renderer, _viewport: &Rectangle, translation: Vector, ) -> Option> { diff --git a/src/ui/ribbon/mod.rs b/src/ui/ribbon/mod.rs index 2f211f40d..d46d44a56 100644 --- a/src/ui/ribbon/mod.rs +++ b/src/ui/ribbon/mod.rs @@ -180,11 +180,13 @@ impl Ribbon { } /// Returns the index of the Layout module in the modules list. + #[allow(dead_code)] // layout-tab helpers; not yet wired pub fn layout_module_index(&self) -> Option { self.modules.iter().position(|m| m.id() == "layout") } /// Returns true if the currently active tab is the Layout module. + #[allow(dead_code)] pub fn active_is_layout(&self) -> bool { self.modules .get(self.active)