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>
This commit is contained in:
Eva
2026-08-20 10:54:06 -04:00
parent b527123aa1
commit 6960bed4ba

View File

@@ -244,7 +244,7 @@ fn parse_ogg(body: &[u8]) -> Result<(u32, Vec<OggPacket>), 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 {