From 2b72794251427ca2091878eddc943232deed4b42 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Sun, 25 Oct 2026 21:30:56 -0400 Subject: [PATCH] lint(engine): explicit imports in engine modules and tests (S2208) Replace glob `use super::*` with the names each module uses, so the module's imports are visible at the top of the file (Sonar rust:S2208). No code changes. --- crates/engine/src/cmd/globaledit.rs | 2 +- crates/engine/src/cmd/symbollib.rs | 2 +- crates/engine/src/tests_colourfonts.rs | 2 +- crates/engine/src/tests_compoundpaint.rs | 2 +- crates/engine/src/tests_constrain_new.rs | 2 +- crates/engine/src/tests_constrain_tools.rs | 2 +- crates/engine/src/tests_globaledit.rs | 2 +- crates/engine/src/tests_simplify_part.rs | 2 +- crates/engine/src/tests_symbollib.rs | 2 +- crates/engine/src/tests_transformfx.rs | 2 +- crates/engine/src/tests_trap.rs | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/crates/engine/src/cmd/globaledit.rs b/crates/engine/src/cmd/globaledit.rs index c015ffaa2..bc2e7a26b 100644 --- a/crates/engine/src/cmd/globaledit.rs +++ b/crates/engine/src/cmd/globaledit.rs @@ -51,7 +51,7 @@ use vectorcraft_doc::{Appearance, AppearanceItem, Document, FillLayer, Node, Nod use vectorcraft_geom::{Affine, BezPath, PathData, Point, Rect, Shape}; use super::wand::{fill_of, stroke_of}; -use super::*; +use super::{CommandSpec, Result, Session, bad, bool_or, has_doc}; const C: &str = "select.globalEdit"; const OPTIONS: &str = "select.globalEditOptions"; diff --git a/crates/engine/src/cmd/symbollib.rs b/crates/engine/src/cmd/symbollib.rs index 557eb9ba6..fd9b5c239 100644 --- a/crates/engine/src/cmd/symbollib.rs +++ b/crates/engine/src/cmd/symbollib.rs @@ -20,7 +20,7 @@ use super::clipboard::Clipboard; use super::clipboard::resources::SwatchChoices; use super::swatch::str_list; use super::swatchlib::{FileData, LibraryFile, LibraryInfo, stem}; -use super::*; +use super::{CommandSpec, Result, Session, always, bad, bool_or, has_doc, number_or, str_param}; /// The extension of saved symbol libraries: native documents. pub const SYMBOLS_EXT: &str = vectorcraft_format::EXTENSION; diff --git a/crates/engine/src/tests_colourfonts.rs b/crates/engine/src/tests_colourfonts.rs index 1e62fac02..507bee2b8 100644 --- a/crates/engine/src/tests_colourfonts.rs +++ b/crates/engine/src/tests_colourfonts.rs @@ -5,7 +5,7 @@ use serde_json::{Value, json}; use vectorcraft_doc::NodeKind; use vectorcraft_text::test_fonts::{SVG_CHAR, source_sans_gid, svg_font}; -use super::*; +use super::{NodeId, Session}; fn session() -> Session { let mut s = Session::new(); diff --git a/crates/engine/src/tests_compoundpaint.rs b/crates/engine/src/tests_compoundpaint.rs index 8c81ef2ce..a6899ea8a 100644 --- a/crates/engine/src/tests_compoundpaint.rs +++ b/crates/engine/src/tests_compoundpaint.rs @@ -4,7 +4,7 @@ use serde_json::{Value, json}; use vectorcraft_color::Paint; -use super::*; +use super::{NodeId, Session}; fn run(s: &mut Session, id: &str, p: Value) -> Value { s.execute(id, &p).unwrap() diff --git a/crates/engine/src/tests_constrain_new.rs b/crates/engine/src/tests_constrain_new.rs index 3a53333c5..9384b7d5c 100644 --- a/crates/engine/src/tests_constrain_new.rs +++ b/crates/engine/src/tests_constrain_new.rs @@ -8,7 +8,7 @@ use vectorcraft_doc::{LiveShape, NodeKind, TextKind}; use vectorcraft_geom::{PathData, Point, Rect}; use vectorcraft_tools::{Mods, PointerEvent, PointerKind}; -use super::*; +use super::{NodeId, Session, ViewInfo, constrain_click}; use PointerKind::{Down, Drag, Up}; diff --git a/crates/engine/src/tests_constrain_tools.rs b/crates/engine/src/tests_constrain_tools.rs index 357f588fd..a1da7e61c 100644 --- a/crates/engine/src/tests_constrain_tools.rs +++ b/crates/engine/src/tests_constrain_tools.rs @@ -7,7 +7,7 @@ use vectorcraft_doc::{LiveShape, NodeKind}; use vectorcraft_geom::{Point, Vec2}; use vectorcraft_tools::{Mods, PointerEvent, PointerKind, ToolKey}; -use super::*; +use super::{NodeId, Session, ViewInfo}; fn new_doc() -> Session { let mut s = Session::new(); diff --git a/crates/engine/src/tests_globaledit.rs b/crates/engine/src/tests_globaledit.rs index c928d1712..566469194 100644 --- a/crates/engine/src/tests_globaledit.rs +++ b/crates/engine/src/tests_globaledit.rs @@ -6,7 +6,7 @@ use serde_json::{Value, json}; use vectorcraft_doc::{Node, NodeKind}; use vectorcraft_geom::{Affine, PathData, Rect}; -use super::*; +use super::{EngineError, NodeId, Session}; fn session() -> Session { let mut s = Session::new(); diff --git a/crates/engine/src/tests_simplify_part.rs b/crates/engine/src/tests_simplify_part.rs index 4f600f68a..6e88af96e 100644 --- a/crates/engine/src/tests_simplify_part.rs +++ b/crates/engine/src/tests_simplify_part.rs @@ -10,7 +10,7 @@ use vectorcraft_doc::NodeKind; use vectorcraft_geom::kurbo::ParamCurveNearest; use vectorcraft_geom::{ParamCurve, PathData, SubPath}; -use super::*; +use super::{NodeId, Session}; fn session() -> Session { let mut s = Session::new(); diff --git a/crates/engine/src/tests_symbollib.rs b/crates/engine/src/tests_symbollib.rs index eed7229ef..81374ebb7 100644 --- a/crates/engine/src/tests_symbollib.rs +++ b/crates/engine/src/tests_symbollib.rs @@ -6,7 +6,7 @@ use serde_json::{Value, json}; use vectorcraft_doc::{NodeId, NodeKind, SymbolRegistration}; -use super::*; +use super::{Session, cmd}; fn session() -> Session { let mut s = Session::new(); diff --git a/crates/engine/src/tests_transformfx.rs b/crates/engine/src/tests_transformfx.rs index 7fdda3928..864b2d84f 100644 --- a/crates/engine/src/tests_transformfx.rs +++ b/crates/engine/src/tests_transformfx.rs @@ -5,7 +5,7 @@ use serde_json::{Value, json}; use vectorcraft_doc::Node; -use super::*; +use super::{NodeId, Session}; fn session() -> Session { let mut s = Session::new(); diff --git a/crates/engine/src/tests_trap.rs b/crates/engine/src/tests_trap.rs index 87fb92a6f..3c88f1500 100644 --- a/crates/engine/src/tests_trap.rs +++ b/crates/engine/src/tests_trap.rs @@ -5,7 +5,7 @@ use vectorcraft_color::{Color, Paint}; use vectorcraft_doc::{Node, NodeKind}; use vectorcraft_geom::Rect; -use super::*; +use super::{NodeId, Session}; const YELLOW: Color = Color::Cmyk { c: 0.0, m: 0.0, y: 1.0, k: 0.0 }; const BLUE: Color = Color::Cmyk { c: 1.0, m: 0.6, y: 0.0, k: 0.0 };