mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-21 22:15:40 +00:00
chore(warnings): silence cpal lifetime + unused tray import on Windows
- patches/cpal-0.15.3 wasapi device.rs: annotate MutexGuard return with '_ so mismatched_lifetime_syntaxes stops firing. - lib.rs: gate the MouseButtonState import to non-Windows targets (the Windows tray uses DoubleClick and never pattern-matches it). Cosmetic only, no behavioural change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -342,7 +342,7 @@ impl Device {
|
|||||||
/// Ensures that `future_audio_client` contains a `Some` and returns a locked mutex to it.
|
/// Ensures that `future_audio_client` contains a `Some` and returns a locked mutex to it.
|
||||||
fn ensure_future_audio_client(
|
fn ensure_future_audio_client(
|
||||||
&self,
|
&self,
|
||||||
) -> Result<MutexGuard<Option<IAudioClientWrapper>>, windows::core::Error> {
|
) -> Result<MutexGuard<'_, Option<IAudioClientWrapper>>, windows::core::Error> {
|
||||||
let mut lock = self.future_audio_client.lock().unwrap();
|
let mut lock = self.future_audio_client.lock().unwrap();
|
||||||
if lock.is_some() {
|
if lock.is_some() {
|
||||||
return Ok(lock);
|
return Ok(lock);
|
||||||
|
|||||||
@@ -13,9 +13,13 @@ use std::sync::atomic::{AtomicBool, Ordering};
|
|||||||
|
|
||||||
use tauri::{
|
use tauri::{
|
||||||
menu::{MenuBuilder, MenuItemBuilder, PredefinedMenuItem},
|
menu::{MenuBuilder, MenuItemBuilder, PredefinedMenuItem},
|
||||||
tray::{MouseButton, MouseButtonState, TrayIcon, TrayIconBuilder, TrayIconEvent},
|
tray::{MouseButton, TrayIcon, TrayIconBuilder, TrayIconEvent},
|
||||||
Emitter, Manager,
|
Emitter, Manager,
|
||||||
};
|
};
|
||||||
|
// MouseButtonState is only matched on non-Windows targets — on Windows the
|
||||||
|
// tray uses DoubleClick which doesn't carry a button_state.
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
|
use tauri::tray::MouseButtonState;
|
||||||
|
|
||||||
/// Tracks which user-configured shortcuts are currently registered (shortcut_str → action).
|
/// Tracks which user-configured shortcuts are currently registered (shortcut_str → action).
|
||||||
/// Prevents on_shortcut() accumulating duplicate handlers across JS reloads (HMR / StrictMode).
|
/// Prevents on_shortcut() accumulating duplicate handlers across JS reloads (HMR / StrictMode).
|
||||||
|
|||||||
Reference in New Issue
Block a user