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.
This commit is contained in:
Dylan M. Taylor
2026-10-26 09:52:47 +07:00
committed by bflatastic
parent e63c26ff15
commit 2b72794251
11 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -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";
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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()
+1 -1
View File
@@ -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};
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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 };