mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 06:25:41 +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:
+6
-1
@@ -1,4 +1,9 @@
|
||||
use super::*;
|
||||
use crate::audio;
|
||||
use crate::subsonic_wire_user_agent;
|
||||
|
||||
use super::super::file_transfer::stream_to_file;
|
||||
use super::downloads::{resolve_hot_cache_root, HotCacheDownloadResult};
|
||||
use super::offline::{enqueue_analysis_seed, enqueue_analysis_seed_from_file};
|
||||
|
||||
#[tauri::command]
|
||||
pub(crate) async fn download_track_hot_cache(
|
||||
|
||||
Reference in New Issue
Block a user