From: Kostya Shishkov Date: Mon, 2 Mar 2026 17:06:42 +0000 (+0100) Subject: avi: remove useless cast X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=2781914544da24d925e20a31e6ae506ed8c669dc;p=nihav.git avi: remove useless cast --- diff --git a/nihav-commonfmt/src/demuxers/avi.rs b/nihav-commonfmt/src/demuxers/avi.rs index 0df1423..3c6a5cc 100644 --- a/nihav-commonfmt/src/demuxers/avi.rs +++ b/nihav-commonfmt/src/demuxers/avi.rs @@ -138,7 +138,7 @@ impl AVIStream { if header.colors > 0 { if let Some(ref buf) = edata { let mut pal = [0u8; 1024]; - for (dpal, spal) in pal.chunks_mut(4).take(header.colors as usize).zip(buf.chunks(4)) { + for (dpal, spal) in pal.chunks_mut(4).take(header.colors).zip(buf.chunks(4)) { dpal[0] = spal[2]; dpal[1] = spal[1]; dpal[2] = spal[0];