From 4b6888049f686aab279cab079116241a65e140bd Mon Sep 17 00:00:00 2001 From: Psychotoxical Date: Fri, 10 Apr 2026 17:34:55 +0200 Subject: [PATCH] fix(audio): properly suppress unused-variable warning for DecodeError msg Use `let _ = msg` under `#[cfg(not(debug_assertions))]` so the binding remains available in debug builds for the eprintln! format string. Co-Authored-By: Claude Sonnet 4.6 --- src-tauri/src/audio.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/audio.rs b/src-tauri/src/audio.rs index 1371134f..140d24c1 100644 --- a/src-tauri/src/audio.rs +++ b/src-tauri/src/audio.rs @@ -1149,7 +1149,9 @@ impl Iterator for SizedDecoder { self.current_frame_offset = 0; break; } - Err(symphonia::core::errors::Error::DecodeError(ref _msg)) => { + Err(symphonia::core::errors::Error::DecodeError(ref msg)) => { + #[cfg(not(debug_assertions))] + let _ = msg; self.consecutive_decode_errors += 1; // Log sparingly: first drop, then every 10th to avoid spam. #[cfg(debug_assertions)]