mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 14:35:41 +00:00
refactor(lib_commands): drop super::* + glob in app_api + lib_commands root
Hotspot G final slice — replace cascade-imports in app_api/{core,
analysis,integration,remote,platform}.rs with explicit per-symbol
imports, and convert app_api/mod.rs from broad `pub(crate) use foo::*`
to a per-command list of every Tauri handler.
The remaining glob re-exports live only in lib_commands/mod.rs itself
— and those are deliberate: they flatten the explicitly-listed Tauri
commands one more level so lib.rs's `use lib_commands::*` keeps the
invoke_handler shape unchanged. Each level above is now explicit.
file_transfer.rs's `super::subsonic_wire_user_agent()` becomes
`crate::subsonic_wire_user_agent()` since the lib_commands cascade
no longer pulls lib.rs symbols into super scope.
`grep -rn 'use super::\*' src/lib_commands/` returns zero hits.
Behaviour-preserving.
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
use super::*;
|
||||
|
||||
mod app_api;
|
||||
mod cache;
|
||||
mod file_transfer;
|
||||
mod sync;
|
||||
mod ui;
|
||||
pub(crate) mod app_api;
|
||||
pub(crate) mod cache;
|
||||
pub(crate) mod file_transfer;
|
||||
pub(crate) mod sync;
|
||||
pub(crate) mod ui;
|
||||
|
||||
// Each subdirectory re-exports its Tauri commands explicitly. Flatten one
|
||||
// more level here so `lib.rs`'s `use lib_commands::*;` lands every
|
||||
// invoke-handler-registered name at lib.rs scope.
|
||||
pub(crate) use app_api::*;
|
||||
pub(crate) use cache::*;
|
||||
pub(crate) use sync::*;
|
||||
|
||||
Reference in New Issue
Block a user