From 4c17e51335192345d8e508287c26f17fead930ac Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Sun, 15 Nov 2026 16:23:03 +0000 Subject: [PATCH] exr: fix RGBA writer lint --- crates/exr/src/rgba8.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/exr/src/rgba8.rs b/crates/exr/src/rgba8.rs index 0b26ab8c9..6dc4bde4c 100644 --- a/crates/exr/src/rgba8.rs +++ b/crates/exr/src/rgba8.rs @@ -81,7 +81,7 @@ pub fn write_rgba8(rgba: &[u8], w: u32, h: u32, alpha: bool, compression: Compre }; // channels in the alphabetical order the file layout requires let names: &[u8] = if alpha { b"ABGR" } else { b"BGR" }; - let line = (w as usize).checked_mul(names.len() * 2).ok_or_else(|| Error::FrameSize)?; + let line = (w as usize).checked_mul(names.len() * 2).ok_or(Error::FrameSize)?; // a chunk's byte count is a signed 32-bit field let lines = compression.lines(); if line.checked_mul(lines).and_then(|c| i32::try_from(c).ok()).is_none() { @@ -125,7 +125,7 @@ pub fn write_rgba8(rgba: &[u8], w: u32, h: u32, alpha: bool, compression: Compre let chunks = (h as usize).div_ceil(lines); let table = chunks.checked_mul(8); let body = (h as usize).checked_mul(line + 8); - let size = table.zip(body).and_then(|(t, b)| hd.len().checked_add(t)?.checked_add(b)).ok_or_else(|| Error::FrameSize)?; + let size = table.zip(body).and_then(|(t, b)| hd.len().checked_add(t)?.checked_add(b)).ok_or(Error::FrameSize)?; // the uncompressed size: compressed chunks only shrink it let mut out = Vec::with_capacity(size); out.extend_from_slice(&hd);