mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 07:15:47 +00:00
refactor(lib_commands): drop super::* + glob re-export in ui + cache
Hotspot G first slice — replace the cascade-import pattern in lib_commands/ui/ and lib_commands/cache/ with explicit per-symbol imports + per-command re-exports. ui/mod.rs no longer reaches `pub(crate) use mini::*; pub(crate) use bandsintown::*;` — instead it explicitly re-exports the 8 mini-player Tauri commands + the 3 internal helpers consumed by lib.rs + sync/tray.rs (PAUSE_RENDERING_JS, RESUME_RENDERING_JS, persist_mini_pos_throttled), and fetch_bandsintown_events. cache/mod.rs likewise lists each Tauri command from offline / hot / downloads explicitly. The only cross-crate "internal" re-export is `enqueue_analysis_seed` which analysis_runtime depends on. Inside the .rs files: every `use super::*` is replaced with the specific imports actually needed (super::offline::..., crate::audio, crate::analysis_runtime::..., tauri::Manager, etc.). Behaviour-preserving — no Tauri command name changed, no runtime behaviour shift. Just removes the leak-everything-everywhere import graph that cucadmuh's policy doc forbids.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
use super::*;
|
||||
|
||||
mod mini;
|
||||
mod bandsintown;
|
||||
|
||||
pub(crate) use mini::*;
|
||||
pub(crate) use bandsintown::*;
|
||||
pub(crate) use mini::{
|
||||
close_mini_player, open_mini_player, pause_rendering, persist_mini_pos_throttled,
|
||||
preload_mini_player, resize_mini_player, resume_rendering, set_mini_player_always_on_top,
|
||||
show_main_window, PAUSE_RENDERING_JS, RESUME_RENDERING_JS,
|
||||
};
|
||||
pub(crate) use bandsintown::fetch_bandsintown_events;
|
||||
|
||||
Reference in New Issue
Block a user