From 6c05c10fffbc22e8902fce46e577f98468f3f7f6 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Fri, 23 Oct 2026 22:39:51 -0400 Subject: [PATCH] chore(text): use is_some_and instead of unnecessary map_or (clippy) (#3929) --- crates/text/src/bitmap.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/text/src/bitmap.rs b/crates/text/src/bitmap.rs index 1c34bfe51..c74967db3 100644 --- a/crates/text/src/bitmap.rs +++ b/crates/text/src/bitmap.rs @@ -104,7 +104,7 @@ fn has_compressed_metadata(bytes: &[u8]) -> bool { fn itxt_uncompressed(bytes: &[u8], head_at: usize, len: u32) -> bool { let from = head_at + 8; let data = bytes.get(from..from.saturating_add(len as usize)).unwrap_or(&[]); - data.iter().position(|&b| b == 0).and_then(|kw| data.get(kw + 1)).map_or(false, |&flag| flag == 0) + data.iter().position(|&b| b == 0).and_then(|kw| data.get(kw + 1)).is_some_and(|&flag| flag == 0) } /// The width and height in PNG `bytes`' header (its signature, then the IHDR chunk); `None` when