From c9d44f7804075fa4ecfb48a524bb57d8c1314564 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Tue, 27 Oct 2026 13:19:34 +0000 Subject: [PATCH] style(engine): expand module imports explicitly --- crates/catalog/examples/persist_bench.rs | 2 +- crates/engine/src/camera_preview/colour.rs | 2 +- crates/engine/src/camera_preview/hue_sat.rs | 2 +- crates/engine/src/camera_preview/look_fit.rs | 2 +- crates/engine/src/camera_preview/mono.rs | 2 +- crates/engine/src/camera_preview/pairs.rs | 2 +- crates/engine/src/camera_preview/proxy.rs | 2 +- crates/engine/src/camera_preview/tone.rs | 2 +- crates/engine/src/cmd/geocode.rs | 5 ++++- crates/engine/src/cmd/library/filters.rs | 2 +- crates/engine/src/cmd/library/import.rs | 2 +- crates/engine/src/cmd/library/selection.rs | 2 +- crates/engine/src/cmd/library/specs.rs | 5 ++++- crates/engine/src/denoise/model.rs | 3 +-- crates/engine/src/denoise/products.rs | 5 ++++- crates/engine/src/denoise/session.rs | 5 ++++- crates/engine/src/denoise/settings.rs | 2 +- crates/engine/src/denoise/state.rs | 2 +- crates/engine/src/export/batch.rs | 2 +- crates/engine/src/export/encoding.rs | 5 ++++- crates/engine/src/export/options.rs | 2 +- crates/engine/src/export/params.rs | 2 +- crates/engine/src/export/place.rs | 2 +- crates/engine/src/export/prepare.rs | 2 +- crates/engine/src/export/watermark.rs | 2 +- crates/engine/src/files/fs.rs | 2 +- crates/engine/src/files/load.rs | 2 +- crates/engine/src/files/preview.rs | 2 +- crates/engine/src/files/probe.rs | 2 +- crates/engine/src/import/commit.rs | 2 +- crates/engine/src/import/defaults.rs | 2 +- crates/engine/src/import/files.rs | 3 ++- crates/engine/src/import/job.rs | 2 +- crates/engine/src/import/scan.rs | 2 +- crates/engine/src/import/types.rs | 2 +- crates/engine/src/media/cache.rs | 2 +- crates/engine/src/media/quick.rs | 2 +- crates/engine/src/media/session.rs | 2 +- crates/engine/src/media/settings_hash.rs | 2 +- crates/engine/src/media/source.rs | 2 +- crates/engine/src/rename/fs.rs | 2 +- crates/engine/src/rename/moves.rs | 2 +- crates/engine/src/rename/plan.rs | 2 +- crates/engine/src/rename/sidecar.rs | 2 +- crates/engine/src/rename/tokens.rs | 2 +- xtask/src/ci.rs | 2 +- xtask/src/corpus.rs | 2 +- xtask/src/layers.rs | 2 +- xtask/src/wasm.rs | 2 +- 49 files changed, 65 insertions(+), 50 deletions(-) diff --git a/crates/catalog/examples/persist_bench.rs b/crates/catalog/examples/persist_bench.rs index 693e862d0..1fc05588c 100644 --- a/crates/catalog/examples/persist_bench.rs +++ b/crates/catalog/examples/persist_bench.rs @@ -14,7 +14,7 @@ use std::sync::Arc; use std::time::Instant; -use lightcraft_catalog::*; +use lightcraft_catalog::{Catalog, DEFAULT_FORGET_DAYS, FsStore, HistoryStep, Journal, MediaKind, Op, Photo, PhotoId, Source, folder_of}; use lightcraft_develop::DevelopSettings; fn ms(t: Instant) -> f64 { diff --git a/crates/engine/src/camera_preview/colour.rs b/crates/engine/src/camera_preview/colour.rs index a33a5c7a5..2681466a9 100644 --- a/crates/engine/src/camera_preview/colour.rs +++ b/crates/engine/src/camera_preview/colour.rs @@ -1,7 +1,7 @@ use super::look_fit::{fit_dng_tone, fit_preview}; use super::mono::{fit_dark_tone, monochrome_look}; use super::proxy::{LensGeometry, proxies}; -use super::*; +use super::{CameraLook, CameraTone, CameraTransform, ColorData, D50, D65, Mat3, ProfileLook, REC2020, RawFormat, RawImage, ToneCurve, Xy, bradford}; /// Long edge of the sensor/JPEG proxy a single photo's look is fitted on (the acceptance gates /// below were set at this size). diff --git a/crates/engine/src/camera_preview/hue_sat.rs b/crates/engine/src/camera_preview/hue_sat.rs index 7e92ba519..b3692dc4f 100644 --- a/crates/engine/src/camera_preview/hue_sat.rs +++ b/crates/engine/src/camera_preview/hue_sat.rs @@ -1,6 +1,6 @@ use super::mono::to_prophoto; use super::pairs::{displayed, luma}; -use super::*; +use super::{CameraLook, CameraTone, HsvTable, Mat3, ToneMap, luminance_2020}; /// [`HueSat::apply`] restores the luminance in full only if the table kept at least this share of it. A colour /// the table darkens to [`NO_LUMINANCE_KEPT`] or less (only near-black noise, whose channels go negative) keeps diff --git a/crates/engine/src/camera_preview/look_fit.rs b/crates/engine/src/camera_preview/look_fit.rs index c1588093b..544db5f5f 100644 --- a/crates/engine/src/camera_preview/look_fit.rs +++ b/crates/engine/src/camera_preview/look_fit.rs @@ -3,7 +3,7 @@ use super::mono::{fit_tone_only_with, monochrome}; use super::pairs::{Attempt, TONE_FITS, fit_attempt, fit_partial, search_ordered}; use super::proxy::{CLIP_TOLERANCE, LensGeometry, MIN_PREVIEW_FRACTION, proxies, structure_agrees}; use super::tone::{HighlightCheck, highlights}; -use super::*; +use super::{CameraLook, CameraTone, CameraTransform, HsvTable, Mat3, RawImage, Rgb32f, ToneMap, luminance_2020}; /// The look fitted to the file's camera JPEG, and whether that JPEG is black and white ([`monochrome`]). pub(crate) fn fit_preview(raw: &RawImage, bytes: &[u8], transform: &CameraTransform, lens: Option<&LensGeometry>) -> (Option, bool) { diff --git a/crates/engine/src/camera_preview/mono.rs b/crates/engine/src/camera_preview/mono.rs index cfac90c34..3c0bd5736 100644 --- a/crates/engine/src/camera_preview/mono.rs +++ b/crates/engine/src/camera_preview/mono.rs @@ -7,7 +7,7 @@ use super::pairs::{ }; use super::proxy::{LensGeometry, proxies}; use super::tone::{HighlightCheck, ToneFit, fit_tone, highlights, highlights_hold}; -use super::*; +use super::{CameraLook, CameraTransform, D50, D65, HsvTable, Mat3, PROPHOTO, REC2020, RawImage, Rgb32f, ToneMap, bradford, luminance_2020}; /// A camera JPEG pixel's channels may differ by this much (linear) and still count as grey. const GREY_SPREAD: f32 = 0.002; diff --git a/crates/engine/src/camera_preview/pairs.rs b/crates/engine/src/camera_preview/pairs.rs index 2fce1a871..425f267da 100644 --- a/crates/engine/src/camera_preview/pairs.rs +++ b/crates/engine/src/camera_preview/pairs.rs @@ -3,7 +3,7 @@ use super::proxy::DARK_FLOOR; #[cfg(test)] use super::tone::highlights; use super::tone::{HighlightCheck, ToneFit, highlights_hold}; -use super::*; +use super::{CameraLook, CameraTone, HsvTable, Mat3, Rgb32f, ToneMap, luminance_2020}; /// A fit must cut the held-out squared error to below this share of the fallback's. pub(super) const MIN_IMPROVEMENT: f64 = 0.7; diff --git a/crates/engine/src/camera_preview/proxy.rs b/crates/engine/src/camera_preview/proxy.rs index 81f170a87..b3db0a160 100644 --- a/crates/engine/src/camera_preview/proxy.rs +++ b/crates/engine/src/camera_preview/proxy.rs @@ -2,7 +2,7 @@ use super::colour::{PROFILE_PROXY, PROXY, file_local_look}; use super::hue_sat::fit_hue_sat; use super::look_fit::{FIT_PREVIEW_MAX_PIXELS, SENSOR_CLIP, clip_mask, without_clipped}; use super::pairs::{collect_pairs, fit_matrix}; -use super::*; +use super::{CameraTransform, Filter, HsvTable, Mat3, RawFormat, RawImage, Rgb32f, fit, luminance_2020, resize}; /// The embedded preview's long edge must be at least this share of the raw's (and 384 px): a DNG whose preview is a /// small thumbnail is not fitted. The fit itself runs on a proxy of at most 384 px, so the 1024 px preview diff --git a/crates/engine/src/camera_preview/tone.rs b/crates/engine/src/camera_preview/tone.rs index 19b66948c..f16b8e899 100644 --- a/crates/engine/src/camera_preview/tone.rs +++ b/crates/engine/src/camera_preview/tone.rs @@ -1,6 +1,6 @@ use super::look_fit::dro_off; use super::pairs::{Pairs, displayed, luma}; -use super::*; +use super::{CameraTone, Rgb32f, ToneMap, luminance_2020}; /// How the per-photo tone curve is fitted ([`fit_pairs_ordered`] tries them in order). #[derive(Clone, Copy, PartialEq, Eq, Debug)] diff --git a/crates/engine/src/cmd/geocode.rs b/crates/engine/src/cmd/geocode.rs index feb9b033e..63f8d8f17 100644 --- a/crates/engine/src/cmd/geocode.rs +++ b/crates/engine/src/cmd/geocode.rs @@ -188,7 +188,10 @@ mod download { use lightcraft_geocode::{GEONAMES_BASE, GEONAMES_ZIP}; - use super::*; + use super::{ + Cancel, DownloadOutcome, GEONAMES_ATTRIBUTION, GEONAMES_FILES, GeoNames, PoisonError, Result, Session, Value, bad, dataset_dir, json, + str_param, + }; use crate::activity::Unit; const MAX_ZIP: u64 = 64 * 1024 * 1024; diff --git a/crates/engine/src/cmd/library/filters.rs b/crates/engine/src/cmd/library/filters.rs index 1eaa5223f..f0a3a504f 100644 --- a/crates/engine/src/cmd/library/filters.rs +++ b/crates/engine/src/cmd/library/filters.rs @@ -1,4 +1,4 @@ -use super::*; +use super::{AlbumId, LibrarySource, PhotoId, Result, Session, Value, bad}; /// `base` with a partial Filter (JSON) merged on top. /// `patch` merged onto `base`, its rules brought up to date (`RuleSet::upgrade`), unchecked (see diff --git a/crates/engine/src/cmd/library/import.rs b/crates/engine/src/cmd/library/import.rs index 81b82671f..8437bf165 100644 --- a/crates/engine/src/cmd/library/import.rs +++ b/crates/engine/src/cmd/library/import.rs @@ -1,5 +1,5 @@ use super::selection::strs; -use super::*; +use super::{AlbumId, PhotoId, Result, Selection, Session, Value, bad, bool_or, json, str_param}; /// The auto-import folder's visible files with their sizes (the file-system half of /// `library.autoImportScan`; the app lists on a worker thread and passes `listing`). diff --git a/crates/engine/src/cmd/library/selection.rs b/crates/engine/src/cmd/library/selection.rs index 1ed1868d7..723b7c331 100644 --- a/crates/engine/src/cmd/library/selection.rs +++ b/crates/engine/src/cmd/library/selection.rs @@ -1,4 +1,4 @@ -use super::*; +use super::{AlbumId, Flag, Op, PhotoId, Result, Selection, Session, Value, bad, bool_or, json, ok}; /// The selection after photos left the view (deleted, or rated, flagged or labelled out of it). /// Its callers end an open edit (a slider drag) before their own change, as moving to the next diff --git a/crates/engine/src/cmd/library/specs.rs b/crates/engine/src/cmd/library/specs.rs index 07ab6f221..2e7c1311d 100644 --- a/crates/engine/src/cmd/library/specs.rs +++ b/crates/engine/src/cmd/library/specs.rs @@ -5,7 +5,10 @@ use super::selection::{ album_param, album_targets, album_targets_or_err, change_flag, change_rating, cull, flip, for_targets, has_library, mark_deleted, opt_album_param, rotate, row_step, select_after_deletion, select_by, step, strs, }; -use super::*; +use super::{ + Album, AlbumId, ColorLabel, CommandSpec, CopyrightStatus, Filter, Flag, GroupBy, LibrarySource, Op, PhotoId, Result, Selection, Sort, SortKey, + Value, always, bad, bool_or, cmd, has_active, has_library_selection, has_selection, json, ok, str_param, +}; /// Seeds stay exactly representable as a JSON double, so web and agent clients read back what they wrote. const MAX_SEED: u64 = 1 << 53; diff --git a/crates/engine/src/denoise/model.rs b/crates/engine/src/denoise/model.rs index 28ff953bf..fbd13d79c 100644 --- a/crates/engine/src/denoise/model.rs +++ b/crates/engine/src/denoise/model.rs @@ -4,8 +4,7 @@ use super::gpu::{GPU_CRASHED, GPU_MAX_FALLBACKS, GPU_PARALLEL, GPU_SLOW, GPU_STU use super::settings::{installed_models, read_settings}; #[cfg(feature = "denoise")] use super::state::Pace; -use super::*; - +use super::{Arc, DenoiserManifest, Mutex, Path, TileRunner, Value, json}; /// Stack of the threads that run the model (the runtime recurses through its graph). pub(super) const STACK: usize = 16 << 20; diff --git a/crates/engine/src/denoise/products.rs b/crates/engine/src/denoise/products.rs index 499e8fd6e..bf601b14d 100644 --- a/crates/engine/src/denoise/products.rs +++ b/crates/engine/src/denoise/products.rs @@ -1,6 +1,9 @@ use super::model::{Loader, Model, ModelSlot, RunOn, STACK}; use super::settings::EXT; -use super::*; +use super::{ + Arc, AtomicBool, AtomicUsize, ByteReader, Condvar, Control, DenoiserManifest, HashSet, Hasher128, Layout, Mutex, OnceLock, Ordering, Params, + Path, PathBuf, Photo, PoisonError, RunError, Source, SystemTime, denoise_bayer, product, +}; /// Samples at or above this (white = 1) are clipped: the model leaves them as the camera recorded them. const CLIP: f32 = 0.99; diff --git a/crates/engine/src/denoise/session.rs b/crates/engine/src/denoise/session.rs index 6a452f693..10529d61d 100644 --- a/crates/engine/src/denoise/session.rs +++ b/crates/engine/src/denoise/session.rs @@ -4,7 +4,10 @@ use super::model::STACK; use super::products::{Active, JobSpec, MakeError, Progress, eligible, make_product, product_key, product_path, products_in}; use super::settings::{DIR, SETTINGS_TTL, installed_models, read_settings}; use super::state::{AUTO_LOOK, Failure, MAX_QUEUE, Outcome, Pace, PhotoState, Running}; -use super::*; +use super::{ + Arc, DenoiseSpec, DevelopSettings, HashMap, HashSet, MakeProduct, Mutex, Ordering, PairLoader, Path, PathBuf, Photo, PhotoId, PoisonError, + Selection, Session, Source, Value, json, product, +}; impl Session { /// Where the active model's tiles run (see [`Model::device`]); `{kind: "none"}` while no model is loaded. diff --git a/crates/engine/src/denoise/settings.rs b/crates/engine/src/denoise/settings.rs index f8acd5320..d71c7b074 100644 --- a/crates/engine/src/denoise/settings.rs +++ b/crates/engine/src/denoise/settings.rs @@ -1,6 +1,6 @@ use super::gpu::GPU_SETUP_MARKER; use super::model::RunOn; -use super::*; +use super::{DenoiserManifest, Deserialize, Duration, Path, PathBuf, Serialize, Value}; /// Extension of a product file. pub const EXT: &str = "lcdn"; diff --git a/crates/engine/src/denoise/state.rs b/crates/engine/src/denoise/state.rs index 76a4b6130..37b79cf8b 100644 --- a/crates/engine/src/denoise/state.rs +++ b/crates/engine/src/denoise/state.rs @@ -1,7 +1,7 @@ use super::model::{Loader, default_loader}; use super::products::{Active, Progress}; use super::settings::Settings; -use super::*; +use super::{Arc, Downloads, HashMap, Mutex, PathBuf, PhotoId, Serialize, VecDeque}; /// Most photos waiting in the queue. pub(super) const MAX_QUEUE: usize = 5000; diff --git a/crates/engine/src/export/batch.rs b/crates/engine/src/export/batch.rs index a4bb859e2..b5d45b125 100644 --- a/crates/engine/src/export/batch.rs +++ b/crates/engine/src/export/batch.rs @@ -1,6 +1,6 @@ +use super::ExportOptions; use super::place::Placer; use super::prepare::{Destination, Exported, PreparedExport}; -use super::*; /// Run prepared exports in order: pick each one's path, and hand the bytes (and sidecars) to /// `write`. `exists` tells whether a path is taken. The conflict policy applies to a file and its diff --git a/crates/engine/src/export/encoding.rs b/crates/engine/src/export/encoding.rs index 3cb3be3cb..862c72cd0 100644 --- a/crates/engine/src/export/encoding.rs +++ b/crates/engine/src/export/encoding.rs @@ -1,6 +1,9 @@ use super::options::{ExportFormat, MetadataPolicy, SharpenAmount, SharpenFor}; use super::watermark::{Watermark, draw_watermark, draw_watermark_deep}; -use super::*; +use super::{ + ChromaSubsampling, DateTime, DeepImage, DeepSamples, EncodeImage, EncodeMeta, ExportOptions, Gps, Metadata, NamedSpace, OutputDepth, OutputSpace, + Rgba8, Samples, encode, icc, +}; use std::borrow::Cow; /// Unsharp mask on an 8-bit image (separable box-blur approximation of a small Gaussian). diff --git a/crates/engine/src/export/options.rs b/crates/engine/src/export/options.rs index d1b767be2..5edf078aa 100644 --- a/crates/engine/src/export/options.rs +++ b/crates/engine/src/export/options.rs @@ -1,4 +1,4 @@ -use super::*; +use super::{Deserialize, Serialize}; #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] diff --git a/crates/engine/src/export/params.rs b/crates/engine/src/export/params.rs index 3ef9316da..795d8f367 100644 --- a/crates/engine/src/export/params.rs +++ b/crates/engine/src/export/params.rs @@ -1,7 +1,7 @@ use super::options::{Conflict, DestinationMode, ExportFormat, HdrCurve, MetadataPolicy, Resize, ResizeMode, SharpenAmount, SharpenFor}; use super::prepare::DngCompression; use super::watermark::{Anchor, Watermark}; -use super::*; +use super::{ExportOptions, JxlColour, JxlEffort, JxlOptions, OutputDepth, OutputSpace, TiffCompression}; impl Default for ExportOptions { fn default() -> Self { diff --git a/crates/engine/src/export/place.rs b/crates/engine/src/export/place.rs index f0b1ace61..d223a3a79 100644 --- a/crates/engine/src/export/place.rs +++ b/crates/engine/src/export/place.rs @@ -1,6 +1,6 @@ +use super::ExportOptions; use super::options::{Conflict, DestinationMode}; use super::prepare::{Destination, Exported}; -use super::*; /// Write an exported or rendered file on disk: its folder is created if needed, and the file is /// replaced atomically ([`lightcraft_catalog::safe_file::write_atomic_nosync`]: a temp file diff --git a/crates/engine/src/export/prepare.rs b/crates/engine/src/export/prepare.rs index 1fe988832..0a3dce119 100644 --- a/crates/engine/src/export/prepare.rs +++ b/crates/engine/src/export/prepare.rs @@ -2,7 +2,7 @@ use super::batch::run_batch; use super::encoding::{encode_gain_map_jpeg, encode_rendered, export_metadata, removes_location}; use super::options::ExportFormat; use super::params::apple_photos_unsupported; -use super::*; +use super::{ExportOptions, Metadata, OutputDepth}; /// One exported file. pub struct Exported { diff --git a/crates/engine/src/export/watermark.rs b/crates/engine/src/export/watermark.rs index 68633794b..c074808ea 100644 --- a/crates/engine/src/export/watermark.rs +++ b/crates/engine/src/export/watermark.rs @@ -1,5 +1,5 @@ use super::encoding::srgb8_in; -use super::*; +use super::{DeepImage, DeepSamples, Deserialize, OutputSpace, Rgba8, Serialize}; /// Where a watermark sits. #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] diff --git a/crates/engine/src/files/fs.rs b/crates/engine/src/files/fs.rs index dd1f5273c..7012211af 100644 --- a/crates/engine/src/files/fs.rs +++ b/crates/engine/src/files/fs.rs @@ -1,7 +1,7 @@ use super::load::{load_vec, load_vec_pair, load_vec_reduced}; use super::preview::{fit_box, fs_preview_loader, preview_orientation}; use super::probe::probe_bytes; -use super::*; +use super::{Arc, DenoiseSpec, FileLoader, FileProbe, Filter, PairLoader, ReducedLoader, fit}; /// The file's first [`lightcraft_raw::PREVIEW_PREFIX`] bytes (or the whole file when it is shorter), /// which is what every format [`lightcraft_raw::bounded_preview`] covers keeps its pointer in. diff --git a/crates/engine/src/files/load.rs b/crates/engine/src/files/load.rs index 52b01d7f7..428a84eda 100644 --- a/crates/engine/src/files/load.rs +++ b/crates/engine/src/files/load.rs @@ -1,7 +1,7 @@ use super::colour::bin_factor; use super::preview::{fit_box, load_embedded_preview}; use super::probe::preview_reason; -use super::*; +use super::{Arc, CameraColourModel, DenoiseSpec, Filter, HIGHLIGHT_CLIP, Orientation, Rgb32f, SourceInfo, fit, xy_to_temp_tint}; /// Decode a file into a linear Rec.2020 image no larger than `max_edge`, oriented. /// diff --git a/crates/engine/src/files/preview.rs b/crates/engine/src/files/preview.rs index 49430e62a..825167f5c 100644 --- a/crates/engine/src/files/preview.rs +++ b/crates/engine/src/files/preview.rs @@ -1,5 +1,5 @@ use super::fs::{quick_image_srgb, raf_preview_extent, read_prefix, read_prefix_at}; -use super::*; +use super::{Arc, Filter, Orientation, PreviewLoader, Rgb32f, SourceInfo, fit}; /// Orientation for an embedded preview: its own EXIF orientation when it has one, else the raw file's. pub(super) fn preview_orientation(raw_bytes: &[u8], jpeg_orientation: u16) -> Orientation { diff --git a/crates/engine/src/files/probe.rs b/crates/engine/src/files/probe.rs index aff0b884c..12913bc6f 100644 --- a/crates/engine/src/files/probe.rs +++ b/crates/engine/src/files/probe.rs @@ -1,6 +1,6 @@ use super::load::WbScaleOf; use super::preview::embedded_preview_size; -use super::*; +use super::{MediaKind, Meta, Orientation, ProbeInfo}; pub(super) fn meta_of(m: &lightcraft_meta::Metadata) -> (Meta, Option) { let shutter = m.exposure_time.map(|t| if t >= 1.0 { format!("{t:.0}") } else { format!("1/{:.0}", 1.0 / t) }).unwrap_or_default(); diff --git a/crates/engine/src/import/commit.rs b/crates/engine/src/import/commit.rs index bed8356fb..7d1a69fdd 100644 --- a/crates/engine/src/import/commit.rs +++ b/crates/engine/src/import/commit.rs @@ -2,7 +2,7 @@ use super::defaults::apply_import_defaults; use super::files::copy_into; use super::job::{Prepared, PreparedItem, ReadyFile}; use super::types::{Duplicate, ImportOptions, ImportReport, Kept, Moved, OnDeleted}; -use super::*; +use super::{HashMap, Op, Path, PathBuf, Photo, PhotoId, ProbeInfo, Session, Source}; /// A batch's items in file order while its transfers are pending ([`ImportJob::run_plan`]). #[derive(Default)] diff --git a/crates/engine/src/import/defaults.rs b/crates/engine/src/import/defaults.rs index 7ca5cecc4..6fd3feb00 100644 --- a/crates/engine/src/import/defaults.rs +++ b/crates/engine/src/import/defaults.rs @@ -1,4 +1,4 @@ -use super::*; +use super::{Deserialize, Photo, Serialize, Session}; /// The develop settings a photo gets on import: raws start from their as-shot white balance with /// default sharpening / colour noise reduction, and file-embedded lens corrections on (as the diff --git a/crates/engine/src/import/files.rs b/crates/engine/src/import/files.rs index 2cbfc85e7..099794597 100644 --- a/crates/engine/src/import/files.rs +++ b/crates/engine/src/import/files.rs @@ -5,7 +5,7 @@ use super::job::{ImportJob, Prepared, PreparedItem, ReadyFile}; use super::scan::ScanProgress; #[cfg(test)] use super::types::{ImportMode, ImportOptions}; -use super::*; +use super::{Path, PathBuf, ProbeInfo, Session}; /// File extensions offered by import discovery and file pickers (lower case). /// This includes preview-only raws; the file probe decides whether sensor decoding is available. @@ -253,6 +253,7 @@ pub(super) fn copy_into(dir: &Path, src: &str, name: Option<&str>, probe_hash: O #[cfg(test)] mod prepared_tests { use super::*; + use lightcraft_catalog::{Op, Photo, PhotoId, Source}; /// Extensions the picker may offer: every one in [`EXTENSIONS`], minus the /// files this build cannot import (see [`accept_list`]). diff --git a/crates/engine/src/import/job.rs b/crates/engine/src/import/job.rs index 47bc0756f..1730518d5 100644 --- a/crates/engine/src/import/job.rs +++ b/crates/engine/src/import/job.rs @@ -1,7 +1,7 @@ use super::commit::{How, Plan, Slot, Transfer, commit_prepared, name_family, run_transfers, system_clock}; use super::files::{expand, probe_all}; use super::types::{ImportCandidate, ImportMode, ImportOptions, ImportReport, Kept, OnDeleted}; -use super::*; +use super::{HashMap, MediaKind, Path, PathBuf, Photo, PhotoId, ProbeInfo, Session, Source}; /// Import files/folders. See the module docs. pub fn import(s: &mut Session, paths: &[String], mode: ImportMode) -> crate::Result { diff --git a/crates/engine/src/import/scan.rs b/crates/engine/src/import/scan.rs index 61d8d4690..ef925fa05 100644 --- a/crates/engine/src/import/scan.rs +++ b/crates/engine/src/import/scan.rs @@ -1,6 +1,6 @@ use super::files::{expand, probe_all}; use super::types::ImportCandidate; -use super::*; +use super::{HashMap, Path, PathBuf, PhotoId, ProbeInfo, Session, Source}; /// What a [`scan`] needs from the session, so it can run on another thread (a folder on a network /// share can take minutes to read). diff --git a/crates/engine/src/import/types.rs b/crates/engine/src/import/types.rs index 4a848015b..6ad3e2153 100644 --- a/crates/engine/src/import/types.rs +++ b/crates/engine/src/import/types.rs @@ -1,4 +1,4 @@ -use super::*; +use super::{Deserialize, MediaKind, Photo, Serialize}; #[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] pub enum ImportMode { diff --git a/crates/engine/src/media/cache.rs b/crates/engine/src/media/cache.rs index c3d323e38..238870c07 100644 --- a/crates/engine/src/media/cache.rs +++ b/crates/engine/src/media/cache.rs @@ -1,6 +1,6 @@ use super::settings_hash::SettingsHashes; use super::source::{DecodedSource, DenoiseSpec, PairLoader, RENDERED_MEM_BYTES, SourceLevel, SourceRef, THUMB_SOURCE_BYTES}; -use super::*; +use super::{Arc, DevelopSettings, Hasher128, Lru, MediaCache, Photo, PhotoId, PreviewCache, Rgb32f, Source, SourceInfo}; /// The photos that have a cached denoised picture for the denoise model in use. Only memory: nothing here touches the /// file system, so it can be asked on the UI thread. diff --git a/crates/engine/src/media/quick.rs b/crates/engine/src/media/quick.rs index 6098ed4dd..ca399b561 100644 --- a/crates/engine/src/media/quick.rs +++ b/crates/engine/src/media/quick.rs @@ -1,6 +1,6 @@ use super::render::{RenderJob, RenderResult}; use super::source::{PreviewLoader, SourceLevel}; -use super::*; +use super::{Arc, Deserialize, Hash128, Histogram, Photo, PhotoId, PreviewCache, Rendered, Rgba8, Serialize, Source, SourceInfo}; /// Where a [`QuickJob`]'s stand-in image came from. #[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] diff --git a/crates/engine/src/media/session.rs b/crates/engine/src/media/session.rs index d160b216d..b222739fe 100644 --- a/crates/engine/src/media/session.rs +++ b/crates/engine/src/media/session.rs @@ -1,7 +1,7 @@ use super::quick::{QuickJob, content_key, source_info}; use super::render::{RenderJob, RenderResult}; use super::source::{PreviewLoader, RENDER_CACHE_VERSION, SourceLevel, SourceRef, THUMB_SIZES, face_edge, source_edge_needed, thumb_bucket}; -use super::*; +use super::{Arc, DevelopSettings, Hash128, Hasher128, MediaKind, Op, Photo, PhotoId, RenderRequest, Rendered, Rgb32f, Source, SourceInfo}; impl crate::Session { /// Build a render job for `id` fitting `max_w × max_h`. `before` renders the unedited look. diff --git a/crates/engine/src/media/settings_hash.rs b/crates/engine/src/media/settings_hash.rs index 5d9c08b93..802918fb9 100644 --- a/crates/engine/src/media/settings_hash.rs +++ b/crates/engine/src/media/settings_hash.rs @@ -1,4 +1,4 @@ -use super::*; +use super::{Arc, DevelopSettings, HashMap, PhotoId, VecDeque, Weak}; pub(super) const SETTINGS_HASH_ENTRIES: usize = 1024; diff --git a/crates/engine/src/media/source.rs b/crates/engine/src/media/source.rs index 51c54c60a..8f6a9c28c 100644 --- a/crates/engine/src/media/source.rs +++ b/crates/engine/src/media/source.rs @@ -1,4 +1,4 @@ -use super::*; +use super::{Arc, Deserialize, DevelopSettings, MediaKind, Photo, Rgb32f, Rgba8, Serialize, SourceInfo}; /// Bump when the pipeline's output changes, to invalidate cached thumbnails. pub const RENDER_CACHE_VERSION: u64 = 70; diff --git a/crates/engine/src/rename/fs.rs b/crates/engine/src/rename/fs.rs index 352140b38..71de1a784 100644 --- a/crates/engine/src/rename/fs.rs +++ b/crates/engine/src/rename/fs.rs @@ -1,5 +1,5 @@ use super::sidecar::PacketVersion; -use super::*; +use super::{Path, PathBuf, SidecarNaming}; /// Every sidecar that may belong to `path` (both naming conventions, `.xmp` and `.XMP`). pub(super) fn sidecars(path: &str) -> Vec<(PathBuf, SidecarNaming, bool)> { diff --git a/crates/engine/src/rename/moves.rs b/crates/engine/src/rename/moves.rs index 6f7c245c9..07d7fdfc3 100644 --- a/crates/engine/src/rename/moves.rs +++ b/crates/engine/src/rename/moves.rs @@ -1,6 +1,6 @@ use super::fs::{MoveFs, RealFs, folded_path, is_respelling, move_one, sidecars}; use super::sidecar::{RetainedPacket, SidecarMove, advance_packets, note_companions, packet_aliases}; -use super::*; +use super::{HashMap, HashSet, Op, Path, PathBuf, SidecarNaming, Source}; /// Why [`move_file`] failed, and what it left behind. #[derive(Clone, Debug, PartialEq)] diff --git a/crates/engine/src/rename/plan.rs b/crates/engine/src/rename/plan.rs index 331297ba4..4c9620bf1 100644 --- a/crates/engine/src/rename/plan.rs +++ b/crates/engine/src/rename/plan.rs @@ -2,7 +2,7 @@ use super::fs::{MoveFs, RealFs, folded_path}; use super::moves::{BatchMoveError, move_all, set_file_ops_to}; use super::sidecar::{PacketVersion, retry_sidecars, retry_sidecars_for_paths}; use super::tokens::{expand, split_ext}; -use super::*; +use super::{EngineError, HashMap, HashSet, Op, Path, PathBuf, Photo, PhotoId, RenamePlan, Result, Session, Source}; /// The photos among `ids` a rename handles, in order: photos sharing one file (virtual copies) /// rename once. No file-system calls. diff --git a/crates/engine/src/rename/sidecar.rs b/crates/engine/src/rename/sidecar.rs index 24ebcd3f9..85f9302d2 100644 --- a/crates/engine/src/rename/sidecar.rs +++ b/crates/engine/src/rename/sidecar.rs @@ -1,5 +1,5 @@ use super::fs::{MoveFs, is_respelling, move_one}; -use super::*; +use super::{Path, PathBuf}; /// An unfinished sidecar operation. Keep its exact paths and any recorded copy requirement: the photo may /// already have followed its new path, so a retry cannot infer this work from the catalog. diff --git a/crates/engine/src/rename/tokens.rs b/crates/engine/src/rename/tokens.rs index 3490e272b..ee15836e8 100644 --- a/crates/engine/src/rename/tokens.rs +++ b/crates/engine/src/rename/tokens.rs @@ -1,4 +1,4 @@ -use super::*; +use super::{MONTHS, Path, Photo, PhotoId, Serialize, Source}; pub(super) fn split_ext(name: &str) -> (&str, &str) { match name.rsplit_once('.') { diff --git a/xtask/src/ci.rs b/xtask/src/ci.rs index 61e179ce0..bc3a9b706 100644 --- a/xtask/src/ci.rs +++ b/xtask/src/ci.rs @@ -1,7 +1,7 @@ use super::layers::cmd_layers; use super::raw_samples::RAW_SAMPLES; use super::wasm::{cmd_wasm, cmd_wasm_for}; -use super::*; +use super::{Command, Path, PathBuf, USAGE, assets, cargo, ci_lock, ci_quick, ci_report, metadata, parity, root, run}; /// CI build jobs: one per 1.5 GB of RAM available when CI starts, at most one per CPU, 4 when it /// is unknown. With line-table debuginfo, 4 jobs measured about 3 GB of RAM in use and 2 jobs diff --git a/xtask/src/corpus.rs b/xtask/src/corpus.rs index 67de8c1ff..434d48b27 100644 --- a/xtask/src/corpus.rs +++ b/xtask/src/corpus.rs @@ -1,5 +1,5 @@ use super::raw_samples::RAW_SAMPLES; -use super::*; +use super::{Command, Path, root, run}; pub(crate) fn cmd_corpus(download: bool) -> Result<(), String> { let corpus = root().join("corpus"); diff --git a/xtask/src/layers.rs b/xtask/src/layers.rs index 13756002d..2a881155b 100644 --- a/xtask/src/layers.rs +++ b/xtask/src/layers.rs @@ -3,7 +3,7 @@ //! The rule engine works on a small, metadata-independent model so it can be //! unit-tested; `from_metadata` builds that model from `cargo metadata`. -use super::*; +use super::{layers, metadata}; use serde_json::Value; /// Where a workspace crate sits. diff --git a/xtask/src/wasm.rs b/xtask/src/wasm.rs index 4f16b2d75..4330769a9 100644 --- a/xtask/src/wasm.rs +++ b/xtask/src/wasm.rs @@ -1,4 +1,4 @@ -use super::*; +use super::{cargo, layers, metadata, run}; /// Workspace packages that must build for wasm32: all L0–L5 crates plus /// the egui shell and the web app.