mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 14:35:41 +00:00
fix(refactor): cfg-gate two items so macOS build is warning-clean (#530)
Mac smoke build surfaced 5 dead-code / unused-import warnings, all cfg-leaks of items that are conditionally compiled on Windows + Linux: - `psysonic-audio::power_resume` is consumed by `power_notify_win` and `power_notify_linux` only — `register_post_sleep_audio_recovery` intentionally falls through to a no-op on macOS (the generic device watcher covers the resume case there). Gate the module declaration to `#[cfg(any(target_os = "windows", target_os = "linux"))]`. - `lib_commands::ui::build_mini_player_window` is re-exported for the Windows-only pre-create path in `lib.rs:setup` (other platforms create the mini-player webview lazily on first invoke). Gate the re-export to `#[cfg(target_os = "windows")]` so non-Windows builds don't warn on an unused import. Both are non-functional — the items themselves are already correctly scoped via cfg in their consumers; only the declarations / re-exports were missing the matching gate.
This commit is contained in:
committed by
GitHub
parent
25507888a9
commit
7a0dd93f3e
@@ -20,6 +20,7 @@ pub mod radio_commands;
|
||||
pub mod transport_commands;
|
||||
mod device_watcher;
|
||||
mod engine;
|
||||
#[cfg(any(target_os = "windows", target_os = "linux"))]
|
||||
mod power_resume;
|
||||
#[cfg(target_os = "windows")]
|
||||
mod power_notify_win;
|
||||
|
||||
Reference in New Issue
Block a user