From f8d80dea14f0c983517dba1f0199a99efec7f28f Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Wed, 18 Nov 2026 19:28:34 -0500 Subject: [PATCH] media: use contains() instead of iter().any() in mp4guard --- crates/media/src/mp4guard.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/media/src/mp4guard.rs b/crates/media/src/mp4guard.rs index a6c84a0e0..45d62f522 100644 --- a/crates/media/src/mp4guard.rs +++ b/crates/media/src/mp4guard.rs @@ -55,7 +55,7 @@ fn boxes_fit(b: &[u8], file_len: u64, depth: u32) -> bool { // short; symphonia stops there), but never inside a parent (the iterator rejects it there) or for `moov` / `moof`. return !matches!(kind, b"moov" | b"moof"); } - let ok = if CONTAINERS.iter().any(|c| *c == kind) { + let ok = if CONTAINERS.contains(&kind) { boxes_fit(bx.payload, file_len, depth + 1) } else if kind == b"meta" { // ISO `meta` is a full box (4 bytes of version and flags first); QuickTime's is not.