Fixup clippy from MSRV 1.85 bump

This commit is contained in:
A. Molzer committed 2026-01-06 17:30:51 +01:00
1 parent 27bfcf5562
commit c4328644b8
1 file changed
+2 -2
+2 -2
View File
@@ -766,7 +766,7 @@ impl<'a, W: 'a + Write + Seek, T: ColorType, K: TiffKind> ImageEncoder<'a, W, T,
} else { } else {
let mut sample_format: Vec<_> = <T>::BITS_PER_SAMPLE.to_vec(); let mut sample_format: Vec<_> = <T>::BITS_PER_SAMPLE.to_vec();
let replicated = let replicated =
core::iter::repeat(<T>::BITS_PER_SAMPLE[0]).take(self.extra_samples.len()); core::iter::repeat_n(<T>::BITS_PER_SAMPLE[0], self.extra_samples.len());
sample_format.extend(replicated); sample_format.extend(replicated);
self.encoder self.encoder
@@ -788,7 +788,7 @@ impl<'a, W: 'a + Write + Seek, T: ColorType, K: TiffKind> ImageEncoder<'a, W, T,
// extra samples and not provided via a slice used for samples themselves. // extra samples and not provided via a slice used for samples themselves.
.unwrap_or(SampleFormat::Void.to_u16()); .unwrap_or(SampleFormat::Void.to_u16());
sample_format.extend(core::iter::repeat(extra_format).take(self.extra_samples.len())); sample_format.extend(core::iter::repeat_n(extra_format, self.extra_samples.len()));
self.encoder self.encoder
.write_tag(Tag::SampleFormat, &sample_format[..])?; .write_tag(Tag::SampleFormat, &sample_format[..])?;