diff --git a/crates/raw/src/raf.rs b/crates/raw/src/raf.rs index 89bf4ca68e..452f51ad50 100644 --- a/crates/raw/src/raf.rs +++ b/crates/raw/src/raf.rs @@ -200,7 +200,8 @@ fn header_model(bytes: &[u8]) -> Option { /// A strip shorter than the samples it holds: Fujifilm's striped compression (`rafc`). fn decode_compressed(bytes: &[u8], src: &[u8], width: usize, height: usize, bits: u32, cfa: &Cfa) -> Result> { - let flag = rafc::stream_flag(src).ok_or_else(|| RawError::unsupported("Fujifilm RAF with an unknown sample storage (short strip without the IS signature)"))?; + let flag = + rafc::stream_flag(src).ok_or_else(|| RawError::unsupported("Fujifilm RAF with an unknown sample storage (short strip without the IS signature)"))?; // The header's compression mode (0 uncompressed, 2 lossless, 3 lossy) must agree with the stream. match be32(bytes, COMPRESSION) { Some(2) if flag == 1 => {} diff --git a/crates/raw/src/rafc.rs b/crates/raw/src/rafc.rs index 34c5266881..40efd8e13e 100644 --- a/crates/raw/src/rafc.rs +++ b/crates/raw/src/rafc.rs @@ -405,8 +405,7 @@ pub(crate) fn zero_stream(bits: u32, xtrans: bool, groups: usize, quantizers: Op } } } - let stream: Vec = - bitstream.chunks(8).map(|chunk| chunk.iter().enumerate().fold(0, |b, (i, bit)| b | (u8::from(*bit) << (7 - i)))).collect(); + let stream: Vec = bitstream.chunks(8).map(|chunk| chunk.iter().enumerate().fold(0, |b, (i, bit)| b | (u8::from(*bit) << (7 - i)))).collect(); // Two stripes; the second is mostly padding, which must never enter the output. let mut out = b"IS".to_vec(); out.extend_from_slice(&[u8::from(quantizers.is_none()), if xtrans { 16 } else { 0 }, bits as u8]);