From 6960bed4ba4f8a7e327def79c274fa3ba27be376 Mon Sep 17 00:00:00 2001 From: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz> Date: Thu, 20 Aug 2026 10:54:06 -0400 Subject: [PATCH] Fix clippy nonminimal_bool in Ogg continuation check Current main's clippy (-D warnings) flags the audio branch's '(flags & 1 != 0) != !partial.is_empty()' in media_audio.rs. Rewrite to the suggested '(flags & 1 != 0) == partial.is_empty()', which is boolean-identical (A != !B <=> A == B): error when the continuation flag disagrees with having a partial packet buffered. Co-authored-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz> Signed-off-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz> --- desktop/src-tauri/src/commands/media_audio.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/src-tauri/src/commands/media_audio.rs b/desktop/src-tauri/src/commands/media_audio.rs index 6104011d4e..f8115f1fa9 100644 --- a/desktop/src-tauri/src/commands/media_audio.rs +++ b/desktop/src-tauri/src/commands/media_audio.rs @@ -244,7 +244,7 @@ fn parse_ogg(body: &[u8]) -> Result<(u32, Vec), String> { expected_sequence = expected_sequence .checked_add(1) .ok_or("Ogg sequence overflow")?; - if (flags & 1 != 0) != !partial.is_empty() { + if (flags & 1 != 0) == partial.is_empty() { return Err("invalid Ogg packet continuation".into()); } if sequence == 0 && flags & 2 == 0 {