From d0b097d83773db2b2e27dbfa49d767a26e3e6e17 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Sat, 24 Oct 2026 08:49:22 +0000 Subject: [PATCH] refactor: explicit imports instead of glob imports in command and test modules (SonarCloud S2208) Co-Authored-By: Claude Sonnet 5.5 --- crates/anim/src/tests.rs | 5 ++++- crates/anim/src/tests_interact.rs | 2 +- crates/engine/src/cmd/animation.rs | 2 +- crates/engine/src/cmd/arrange.rs | 2 +- crates/engine/src/cmd/artistic.rs | 2 +- crates/engine/src/cmd/background.rs | 2 +- crates/engine/src/cmd/color_at_tests.rs | 2 +- crates/engine/src/cmd/compress.rs | 2 +- crates/engine/src/cmd/design.rs | 4 +++- crates/engine/src/cmd/edit.rs | 2 +- crates/engine/src/cmd/file.rs | 2 +- crates/engine/src/cmd/find.rs | 2 +- crates/engine/src/cmd/format.rs | 2 +- crates/engine/src/cmd/ideas.rs | 2 +- crates/engine/src/cmd/insert.rs | 5 ++++- crates/engine/src/cmd/inspect.rs | 2 +- crates/engine/src/cmd/media.rs | 2 +- crates/engine/src/cmd/merge.rs | 2 +- crates/engine/src/cmd/picture_style.rs | 2 +- crates/engine/src/cmd/points.rs | 2 +- crates/engine/src/cmd/recolor.rs | 2 +- crates/engine/src/cmd/reuse.rs | 2 +- crates/engine/src/cmd/review.rs | 2 +- crates/engine/src/cmd/selection.rs | 2 +- crates/engine/src/cmd/selection_tests.rs | 2 +- crates/engine/src/cmd/shape.rs | 5 ++++- crates/engine/src/cmd/slide.rs | 2 +- crates/engine/src/cmd/smartart.rs | 2 +- crates/engine/src/cmd/table.rs | 5 ++++- crates/engine/src/cmd/text.rs | 4 +++- crates/engine/src/cmd/transition.rs | 2 +- crates/engine/src/cmd/zoom.rs | 2 +- crates/engine/src/soak_tests.rs | 2 +- crates/engine/src/tests.rs | 4 +++- crates/format/src/chart_parts_tests.rs | 2 +- crates/geom/src/preset/extra.rs | 4 +++- crates/geom/src/warp/tests.rs | 4 +++- crates/model/src/tests.rs | 5 ++++- crates/ogg/src/tests.rs | 2 +- crates/pdf/src/tests.rs | 2 +- crates/render/src/tests.rs | 5 ++++- crates/render/src/tests_wild.rs | 5 ++++- crates/text/src/tests.rs | 7 ++++++- crates/ui-egui/src/backstage_tests.rs | 2 +- 44 files changed, 80 insertions(+), 44 deletions(-) diff --git a/crates/anim/src/tests.rs b/crates/anim/src/tests.rs index a9ccb946..043fd785 100644 --- a/crates/anim/src/tests.rs +++ b/crates/anim/src/tests.rs @@ -7,7 +7,10 @@ use deckcraft_model::{ AnimClass, AnimStart, Animation, ColorRef, CustomShow, Presentation, Rgba, Shape, ShapeId, Slide, SlideId, TextBody, Transition, Xfrm, }; -use crate::*; +use crate::{ + AnimState, Layer, LinkJump, MotionPath, ShowAction, ShowState, Source, Timeline, TriggerPlay, default_path, ease, morph_crop, morph_frame, + morph_pairs, morph_xfrm, show_order, transition_frame, transition_layers, +}; const W: f64 = 960.0; const H: f64 = 540.0; diff --git a/crates/anim/src/tests_interact.rs b/crates/anim/src/tests_interact.rs index 5f12dda5..1d281081 100644 --- a/crates/anim/src/tests_interact.rs +++ b/crates/anim/src/tests_interact.rs @@ -6,7 +6,7 @@ use std::sync::Arc; use deckcraft_model::text::Action; use deckcraft_model::{AnimClass, AnimStart, Animation, Presentation, Shape, ShapeId, Slide, SlideId, Transition, Xfrm}; -use crate::*; +use crate::{Click, HitShape, LinkJump, ShowAction, ShowState, Target, Timeline}; fn shape(id: u32) -> Shape { Shape { id: ShapeId(id), name: format!("S{id}"), xfrm: Some(Xfrm::new(100.0, 100.0, 200.0, 100.0)), ..Default::default() } diff --git a/crates/engine/src/cmd/animation.rs b/crates/engine/src/cmd/animation.rs index 1a97a3b3..162c660e 100644 --- a/crates/engine/src/cmd/animation.rs +++ b/crates/engine/src/cmd/animation.rs @@ -5,7 +5,7 @@ use std::sync::Arc; use deckcraft_model::anim::{ANIMATIONS, AnimClass, AnimStart, Animation, TextBuild, animation_info}; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, bad, bool_or, bool_param, id_param, ok, str_param, targets, usize_param}; use crate::{Result, Session}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/arrange.rs b/crates/engine/src/cmd/arrange.rs index a679f3e9..74df3de7 100644 --- a/crates/engine/src/cmd/arrange.rs +++ b/crates/engine/src/cmd/arrange.rs @@ -4,7 +4,7 @@ use deckcraft_geom::{Point, Rect, Xfrm}; use deckcraft_model::{Shape, ShapeId, ShapeKind}; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, NO_ID_SPACE, bad, bool_or, edit_geometry, id_param, ok, str_param, targets, usize_param, with_param, xfrm_of}; use crate::{Result, Session}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/artistic.rs b/crates/engine/src/cmd/artistic.rs index 071cd383..009991f3 100644 --- a/crates/engine/src/cmd/artistic.rs +++ b/crates/engine/src/cmd/artistic.rs @@ -9,7 +9,7 @@ use deckcraft_model::{MediaId, ShapeId, ShapeKind}; use image::{GrayImage, Rgba, RgbaImage}; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, NO_ID_SPACE, bad, str_param, targets}; use crate::{Result, Session}; /// The effects offered: `a14` element name and label. diff --git a/crates/engine/src/cmd/background.rs b/crates/engine/src/cmd/background.rs index 5ad93ad9..dc80a112 100644 --- a/crates/engine/src/cmd/background.rs +++ b/crates/engine/src/cmd/background.rs @@ -8,7 +8,7 @@ use std::collections::VecDeque; use deckcraft_model::{ShapeId, ShapeKind}; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, NO_ID_SPACE, bad, base64_encode, f64_or, targets}; use crate::{Result, Session}; /// Larger pictures are refused rather than matted slowly (16 megapixels). diff --git a/crates/engine/src/cmd/color_at_tests.rs b/crates/engine/src/cmd/color_at_tests.rs index 77c8d475..f4ea8d1a 100644 --- a/crates/engine/src/cmd/color_at_tests.rs +++ b/crates/engine/src/cmd/color_at_tests.rs @@ -2,7 +2,7 @@ use serde_json::{Value, json}; -use crate::*; +use crate::Session; fn deck() -> Session { let mut s = Session::with_new(); diff --git a/crates/engine/src/cmd/compress.rs b/crates/engine/src/cmd/compress.rs index 180391c5..6fe1719a 100644 --- a/crates/engine/src/cmd/compress.rs +++ b/crates/engine/src/cmd/compress.rs @@ -8,7 +8,7 @@ use deckcraft_model::style::PictureFill; use deckcraft_model::{MediaId, Shape, ShapeId, ShapeKind}; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, NO_ID_SPACE, bad, bool_or, f64_param, targets}; use crate::{Result, Session}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/design.rs b/crates/engine/src/cmd/design.rs index 08c5398c..be7896a7 100644 --- a/crates/engine/src/cmd/design.rs +++ b/crates/engine/src/cmd/design.rs @@ -10,7 +10,9 @@ use deckcraft_model::theme::{builtin_color_schemes, builtin_font_schemes, builti use deckcraft_model::{Background, Fill, PhType, Presentation, Shape, ShapeId, defaults}; use serde_json::{Value, json}; -use super::*; +use super::{ + CommandSpec, NO_ID_SPACE, bad, bool_or, bool_param, cmd, color_param, f64_param, ok, rect_param, shape, str_param, text, usize_param, with_param, +}; use crate::{Result, Session, Target}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/edit.rs b/crates/engine/src/cmd/edit.rs index 72061085..a5858cbc 100644 --- a/crates/engine/src/cmd/edit.rs +++ b/crates/engine/src/cmd/edit.rs @@ -7,7 +7,7 @@ use deckcraft_model::text::TextBody; use deckcraft_model::{MediaId, Shape, ShapeId, Slide, SlideId}; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, NO_ID_SPACE, bad, base64_encode, bool_or, id_param, ids_param, ok, richclip, str_param, targets, text, xfrm_of}; use crate::{HistoryEntry, Result, Session}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/file.rs b/crates/engine/src/cmd/file.rs index c9526c3c..1c937e51 100644 --- a/crates/engine/src/cmd/file.rs +++ b/crates/engine/src/cmd/file.rs @@ -7,7 +7,7 @@ use deckcraft_media::MediaInfo; use deckcraft_model::{MediaId, MediaItem, Presentation, Shape, ShapeKind, defaults}; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, bad, base64_encode, bool_or, f64_or, ok, str_param, usize_param}; use crate::{DocState, EngineError, Result, Session}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/find.rs b/crates/engine/src/cmd/find.rs index f7a3bcb6..7feda9ac 100644 --- a/crates/engine/src/cmd/find.rs +++ b/crates/engine/src/cmd/find.rs @@ -6,7 +6,7 @@ use deckcraft_model::text::RunKind; use deckcraft_model::{Paragraph, Shape, ShapeKind, Slide, TextBody}; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, bad, bool_or, str_param, text}; use crate::{Result, Session}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/format.rs b/crates/engine/src/cmd/format.rs index 6aa16087..1b375dc2 100644 --- a/crates/engine/src/cmd/format.rs +++ b/crates/engine/src/cmd/format.rs @@ -8,7 +8,7 @@ use deckcraft_model::{ColorRef, ColorTransform, Effects, Fill, Line, SchemeSlot, use serde_json::{Value, json}; use super::text::{format_body, format_para, format_run}; -use super::*; +use super::{CommandSpec, bad, bool_or, bool_param, color_param, edit_shapes, f64_or, f64_param, ids_param, ok, str_param}; use crate::{Result, Session}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/ideas.rs b/crates/engine/src/cmd/ideas.rs index 539d981f..25c71221 100644 --- a/crates/engine/src/cmd/ideas.rs +++ b/crates/engine/src/cmd/ideas.rs @@ -8,7 +8,7 @@ use deckcraft_model::resolve::{self, Ctx}; use deckcraft_model::{Fill, Presentation, Rgba, Shape, ShapeKind}; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, bad, str_param, text, usize_param, xfrm_of}; use crate::{Result, Selection, Session}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/insert.rs b/crates/engine/src/cmd/insert.rs index a9ab3644..41b09746 100644 --- a/crates/engine/src/cmd/insert.rs +++ b/crates/engine/src/cmd/insert.rs @@ -8,7 +8,10 @@ use deckcraft_model::text::{AutoFit, RunKind, TextBody}; use deckcraft_model::{Chart, ColorRef, Fill, Geom, Line, MediaClip, Shape, ShapeId, ShapeKind, ShapeStyle, Table}; use serde_json::{Value, json}; -use super::*; +use super::{ + CommandSpec, NO_ID_SPACE, bad, base64_decode, base64_encode, bool_or, bool_param, edit_shapes, format, ok, rect_param, str_param, text, + usize_param, xfrm_of, +}; use crate::{EngineError, Result, Session}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/inspect.rs b/crates/engine/src/cmd/inspect.rs index 9da535e0..c16ad516 100644 --- a/crates/engine/src/cmd/inspect.rs +++ b/crates/engine/src/cmd/inspect.rs @@ -4,7 +4,7 @@ use deckcraft_model::resolve::{self, Ctx}; use deckcraft_model::{Shape, ShapeKind}; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, bad, id_param, str_param, usize_param, xfrm_of}; use crate::{Result, Session}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/media.rs b/crates/engine/src/cmd/media.rs index 85ed6c3f..88f542cf 100644 --- a/crates/engine/src/cmd/media.rs +++ b/crates/engine/src/cmd/media.rs @@ -5,7 +5,7 @@ use deckcraft_model::{MediaClip, ShapeId, ShapeKind}; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, NO_ID_SPACE, bad, base64_encode, bool_param, edit_shapes, targets}; use crate::{EngineError, MediaStatus, Result, Session, UiRequest}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/merge.rs b/crates/engine/src/cmd/merge.rs index 45990321..edace42c 100644 --- a/crates/engine/src/cmd/merge.rs +++ b/crates/engine/src/cmd/merge.rs @@ -9,7 +9,7 @@ use i_overlay::core::overlay_rule::OverlayRule; use i_overlay::float::single::SingleFloatOverlay; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, NO_ID_SPACE, bad, base64_encode, str_param, targets, text, xfrm_of}; use crate::{Result, Session}; /// Closed polygons (slide points) describing a filled area (non-zero winding). diff --git a/crates/engine/src/cmd/picture_style.rs b/crates/engine/src/cmd/picture_style.rs index a6a7380f..39f98824 100644 --- a/crates/engine/src/cmd/picture_style.rs +++ b/crates/engine/src/cmd/picture_style.rs @@ -6,7 +6,7 @@ use deckcraft_model::style::{Effects, Reflection, Shadow}; use deckcraft_model::{ColorRef, Geom, Line, Shape}; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, bad, edit_shapes, str_param}; use crate::{Result, Session}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/points.rs b/crates/engine/src/cmd/points.rs index 1c4942ba..3ff840db 100644 --- a/crates/engine/src/cmd/points.rs +++ b/crates/engine/src/cmd/points.rs @@ -10,7 +10,7 @@ use deckcraft_geom::{PathEl, Point, Xfrm}; use deckcraft_model::{CustomPath, Geom, Shape, ShapeId, ShapeKind}; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, bad, f64_param, id_param, ok, str_param, xfrm_of}; use crate::{Result, Session}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/recolor.rs b/crates/engine/src/cmd/recolor.rs index 734d166d..740085a6 100644 --- a/crates/engine/src/cmd/recolor.rs +++ b/crates/engine/src/cmd/recolor.rs @@ -6,7 +6,7 @@ use deckcraft_model::style::{PictureAdjust, PictureMode}; use deckcraft_model::{ColorRef, Shape, ShapeId, ShapeKind}; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, bad, bool_or, current_shapes, edit_shapes, str_param, targets, text, xfrm_of}; use crate::{Result, Session}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/reuse.rs b/crates/engine/src/cmd/reuse.rs index 94f1e1b0..3ec49d99 100644 --- a/crates/engine/src/cmd/reuse.rs +++ b/crates/engine/src/cmd/reuse.rs @@ -13,7 +13,7 @@ use deckcraft_model::text::{Action, Hyperlink, RunProps, TextBody}; use deckcraft_model::{LayoutId, Master, MasterId, MediaId, Presentation, ShapeId, ShapeKind, Slide, SlideId}; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, NO_ID_SPACE, bad, bool_or, cmd, slide, text, usize_param}; use crate::{Result, Session, media_refs}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/review.rs b/crates/engine/src/cmd/review.rs index 1d2969e0..e0d59c39 100644 --- a/crates/engine/src/cmd/review.rs +++ b/crates/engine/src/cmd/review.rs @@ -5,7 +5,7 @@ use std::sync::Arc; use deckcraft_model::Comment; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, bad, base64_decode, bool_or, bool_param, f64_or, id_param, ok, str_param, text, usize_param}; use crate::{Result, Session, Target, UiRequest}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/selection.rs b/crates/engine/src/cmd/selection.rs index 76eaa706..e39c98ea 100644 --- a/crates/engine/src/cmd/selection.rs +++ b/crates/engine/src/cmd/selection.rs @@ -5,7 +5,7 @@ use deckcraft_model::{Shape, ShapeId}; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, bad, bool_or, id_param, ids_param, ok}; use crate::{Result, Session}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/selection_tests.rs b/crates/engine/src/cmd/selection_tests.rs index 69bcc3c8..e4e2494b 100644 --- a/crates/engine/src/cmd/selection_tests.rs +++ b/crates/engine/src/cmd/selection_tests.rs @@ -2,8 +2,8 @@ use serde_json::{Value, json}; +use crate::Session; use crate::tools::{Mods, PointerEvent, PointerKind}; -use crate::*; /// A blank slide with A, B, C (back to front) and G = group [D, H = group [E, F]] in front. fn deck() -> (Session, Vec) { diff --git a/crates/engine/src/cmd/shape.rs b/crates/engine/src/cmd/shape.rs index c90e004e..a84d697f 100644 --- a/crates/engine/src/cmd/shape.rs +++ b/crates/engine/src/cmd/shape.rs @@ -8,7 +8,10 @@ use deckcraft_model::style::{Dash, Glow, Gradient, GradientShape, GradientStop, use deckcraft_model::{ColorRef, Effects, Fill, Geom, Line, ShapeStyle}; use serde_json::{Value, json}; -use super::*; +use super::{ + CommandSpec, NO_ID_SPACE, bad, bool_or, bool_param, color_param, color_value, edit_geometry, edit_shapes, f64_param, format, id_param, ok, + str_param, targets, text, three_d, usize_param, with_param, xfrm_of, +}; use crate::{Result, Session}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/slide.rs b/crates/engine/src/cmd/slide.rs index 8002aac9..f4d1e431 100644 --- a/crates/engine/src/cmd/slide.rs +++ b/crates/engine/src/cmd/slide.rs @@ -6,7 +6,7 @@ use deckcraft_model::text::TextBody; use deckcraft_model::{LayoutId, LayoutType, Presentation, Section, SlideId, defaults}; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, NO_ID_SPACE, bad, bool_or, bool_param, ok, opt_usize_param, str_param, text, usize_param}; use crate::{Result, Session, Target}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/smartart.rs b/crates/engine/src/cmd/smartart.rs index c58d1830..ba250960 100644 --- a/crates/engine/src/cmd/smartart.rs +++ b/crates/engine/src/cmd/smartart.rs @@ -14,7 +14,7 @@ use deckcraft_model::{ }; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, NO_ID_SPACE, bad, bool_or, current_shapes, shape_of, str_param, targets, text, xfrm_of}; use crate::{EngineError, Result, Session}; /// Deepest outline level the Text Pane allows. diff --git a/crates/engine/src/cmd/table.rs b/crates/engine/src/cmd/table.rs index f512f960..7e49c4ce 100644 --- a/crates/engine/src/cmd/table.rs +++ b/crates/engine/src/cmd/table.rs @@ -4,7 +4,10 @@ use deckcraft_geom::{Affine, Point, Rect}; use deckcraft_model::{Shape, ShapeKind, Table}; use serde_json::{Value, json}; -use super::*; +use super::{ + CommandSpec, bad, bool_or, bool_param, color_param, edit_shapes, f64_param, id_param, ok, str_param, table_drawn_heights, targets, usize_param, + xfrm_of, +}; use crate::{DocState, Result, Session}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/text.rs b/crates/engine/src/cmd/text.rs index 22a26ea1..48e4c5c1 100644 --- a/crates/engine/src/cmd/text.rs +++ b/crates/engine/src/cmd/text.rs @@ -9,7 +9,9 @@ use deckcraft_model::text::{Align, AutoFit, Hyperlink, Paragraph, Run, RunKind, use deckcraft_model::{Presentation, Shape, ShapeId, ShapeKind}; use serde_json::{Value, json}; -use super::*; +use super::{ + CommandSpec, NO_TEXT_POINT, SELECT_TEXT_OR_SHAPE, bad, bool_or, cmd, edit_shapes, format, id_param, ok, shape_of, str_param, text, xfrm_of, +}; use crate::{DocState, HistoryEntry, Result, Selection, Session, Target, TextSel, push_undo}; /// Catalogue text-editing, selection, autocorrect, font, IME, and surrounding-deletion commands diff --git a/crates/engine/src/cmd/transition.rs b/crates/engine/src/cmd/transition.rs index 327298c6..a2713e0b 100644 --- a/crates/engine/src/cmd/transition.rs +++ b/crates/engine/src/cmd/transition.rs @@ -6,7 +6,7 @@ use deckcraft_model::Transition; use deckcraft_model::anim::TRANSITIONS; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, NO_ID_SPACE, bad, bool_param, ok, str_param, usize_param}; use crate::{Result, Session}; pub fn specs() -> Vec { diff --git a/crates/engine/src/cmd/zoom.rs b/crates/engine/src/cmd/zoom.rs index 039e1671..e6350f53 100644 --- a/crates/engine/src/cmd/zoom.rs +++ b/crates/engine/src/cmd/zoom.rs @@ -13,7 +13,7 @@ use deckcraft_model::text::{Action, Hyperlink, TextBody}; use deckcraft_model::{LayoutType, Shape, ShapeId, ShapeKind, SlideId, defaults}; use serde_json::{Value, json}; -use super::*; +use super::{CommandSpec, NO_ID_SPACE, bad, bool_or, str_param}; use crate::{Result, Session}; pub fn specs() -> Vec { diff --git a/crates/engine/src/soak_tests.rs b/crates/engine/src/soak_tests.rs index 9c70d155..2b315405 100644 --- a/crates/engine/src/soak_tests.rs +++ b/crates/engine/src/soak_tests.rs @@ -9,7 +9,7 @@ use std::collections::VecDeque; use serde_json::{Value, json}; -use crate::*; +use crate::{EngineError, Session, command_specs, sample}; /// Commands that touch the file system, other windows or real time; the soak drives the rest. fn skipped(id: &str) -> bool { diff --git a/crates/engine/src/tests.rs b/crates/engine/src/tests.rs index eb0cb91d..7cf7a558 100644 --- a/crates/engine/src/tests.rs +++ b/crates/engine/src/tests.rs @@ -1,6 +1,8 @@ use serde_json::json; -use crate::*; +use crate::{ + DocState, History, Presentation, Session, Target, TextSel, ToolKind, Value, cmd, command_specs, connect, find_command, model, sample, tools, +}; fn session() -> Session { Session::with_new() diff --git a/crates/format/src/chart_parts_tests.rs b/crates/format/src/chart_parts_tests.rs index 61a00dc9..45bb6459 100644 --- a/crates/format/src/chart_parts_tests.rs +++ b/crates/format/src/chart_parts_tests.rs @@ -1,4 +1,4 @@ -use super::*; +use super::Presentation; use deckcraft_model::chart::{Chart, ChartPart, ChartRel, ChartType}; use deckcraft_model::{Master, Shape, ShapeId}; use serde_json::{Value, json}; diff --git a/crates/geom/src/preset/extra.rs b/crates/geom/src/preset/extra.rs index ac3848e9..9abf5930 100644 --- a/crates/geom/src/preset/extra.rs +++ b/crates/geom/src/preset/extra.rs @@ -2,7 +2,9 @@ //! ribbons, gears, tabs and chart markers. Like the rest of `preset`, every outline is our own //! construction, fitted to how the shapes look and to what their adjust values mean. -use super::*; +use super::{ + Corner, Dir, Geometry, Handle, Pb, Rect, Vec2, corner_rect, fill, fill_eo, fill_only, mid_sites, orient, shade, simple, stroke_only, vis, +}; /// Builds the presets this module knows; `None` for any other name. pub(super) fn build(name: &str, w: f64, h: f64, a: &dyn Fn(usize) -> f64) -> Option { diff --git a/crates/geom/src/warp/tests.rs b/crates/geom/src/warp/tests.rs index c04ddd10..c85b2b0a 100644 --- a/crates/geom/src/warp/tests.rs +++ b/crates/geom/src/warp/tests.rs @@ -1,4 +1,6 @@ -use super::*; +use super::{ + Band, BezPath, CATALOG, Guide, Point, Rect, WarpLine, adjust_count, adjust_defaults, band_of_line, handles, is_follow, is_supported, warp, +}; const W: f64 = 420.0; const H: f64 = 200.0; diff --git a/crates/model/src/tests.rs b/crates/model/src/tests.rs index bc3817d9..69d355cc 100644 --- a/crates/model/src/tests.rs +++ b/crates/model/src/tests.rs @@ -1,4 +1,7 @@ -use super::*; +use super::{ + Cell, Fill, LayoutType, PhType, Presentation, Run, SchemeSlot, Shape, ShapeKind, ShapeStyle, Slide, TextBody, Theme, Xfrm, defaults, resolve, + style, text, theme, walk, +}; use crate::resolve::Ctx; #[test] diff --git a/crates/ogg/src/tests.rs b/crates/ogg/src/tests.rs index 8e118b4e..cf2720d8 100644 --- a/crates/ogg/src/tests.rs +++ b/crates/ogg/src/tests.rs @@ -1,6 +1,6 @@ //! Synthetic Ogg streams: a small page writer (RFC 3533) and Opus-like packets. -use super::*; +use super::{Codec, Error, OpusTiming, Packet, Stream, crc32, open, opus_packet_samples, sniff}; /// Write one page holding `segments` (lacing already computed by `lace`). fn page(out: &mut Vec, flags: u8, granule: i64, serial: u32, seq: u32, lacing: &[u8], body: &[u8]) { diff --git a/crates/pdf/src/tests.rs b/crates/pdf/src/tests.rs index a17d461e..bd59f9d9 100644 --- a/crates/pdf/src/tests.rs +++ b/crates/pdf/src/tests.rs @@ -1,6 +1,6 @@ use std::sync::Arc; -use super::*; +use super::{Font, PageLayout, PdfError, PdfOptions, Presentation, export, handout_boxes, raster_scale}; use deckcraft_model::text::TextBody; fn deck(n: usize) -> Presentation { diff --git a/crates/render/src/tests.rs b/crates/render/src/tests.rs index 4a2c8a5a..b0f67cef 100644 --- a/crates/render/src/tests.rs +++ b/crates/render/src/tests.rs @@ -1,4 +1,7 @@ -use super::*; +use super::{ + Ctx, Fill, Image, Opts, PathMorph, Point, Rect, RenderOpts, Renderer, SlideFields, TextMorph, crop_dest, dpi_for_scale, gif_frame, image_dpi, + images, morph_path, morph_text, parse_path, place_slide, render_blend, render_shapes, render_slide, text_transform, +}; use deckcraft_model::chart::{ChartType, Trendline, TrendlineType}; use deckcraft_model::style::ColorRef; use deckcraft_model::text::TextBody; diff --git a/crates/render/src/tests_wild.rs b/crates/render/src/tests_wild.rs index 77fe87ac..8f548d2a 100644 --- a/crates/render/src/tests_wild.rs +++ b/crates/render/src/tests_wild.rs @@ -1,7 +1,10 @@ //! Render tests for shape, line, fill and effect cases checked against PowerPoint's own exports //! of synthetic "wild" slides (observed black-box; see `plan/powerpoint/tools/gen_wild.py`). -use super::*; +use super::{ + BezPath, Fill, Image, Line, MAX_DASHES, PathEl, Point, Rect, RenderOpts, ShapeKind, dash_with_caps, head_size, images, limit_dash_count, paint, + preset, render_slide, trim_ends, +}; use deckcraft_color::Rgba; use deckcraft_model::style::ColorRef; use deckcraft_model::{CustomPath, Geom, Presentation, Shape, ShapeId, Xfrm}; diff --git a/crates/text/src/tests.rs b/crates/text/src/tests.rs index 0df5db4e..fd02e821 100644 --- a/crates/text/src/tests.rs +++ b/crates/text/src/tests.rs @@ -1,4 +1,9 @@ -use super::*; +use super::{ + Affinity, Align, Anchor, Arc, AutoFit, BodyProps, Bullet, Caps, Cell, Ctx, Dash, Deco, DecoLine, FontDb, FontFace, GlyphRun, LINE_PITCH, + MoveMode, NoFields, Opts, ParaProps, Point, Pos, Rect, Rgba, SUB_SUPER, Shape, Spacing, Strike, TextBody, TextLayout, autonum, + break_opportunities, caps_char, chinese_num, covers_symbol, is_symbol_font, is_upright, layout, layout_scaled, map_symbol_bullet, measure_str, + resolve, shaping_features, symbol_char, symbol_font_char, symbol_font_draw, symbol_unicode, symbol_unicode_alts, +}; use deckcraft_model::Fill; use deckcraft_model::defaults; use deckcraft_model::text::{Paragraph, Run}; diff --git a/crates/ui-egui/src/backstage_tests.rs b/crates/ui-egui/src/backstage_tests.rs index ec133129..9a6048e4 100644 --- a/crates/ui-egui/src/backstage_tests.rs +++ b/crates/ui-egui/src/backstage_tests.rs @@ -12,7 +12,7 @@ use egui_kittest::Harness; use egui_kittest::kittest::Queryable; use serde_json::json; -use super::*; +use super::theme; use crate::{Services, SlideApp}; fn harness(app: SlideApp) -> Harness<'static, SlideApp> {