fix(create): report invalid PNG fixture through allowed test panic

This commit is contained in:
Dylan M. Taylor committed 2026-11-14 15:16:45 -05:00
1 parent 3df300cdbc
commit 163a44bdea
1 file changed
+1 -1
+1 -1
View File
@@ -1687,7 +1687,7 @@ fn png_of(w: u32, h: u32, color: TestPngColor, depth: TestPngDepth, data: &[u8],
(TestPngColor::Grayscale | TestPngColor::Indexed, TestPngDepth::One) => (w as usize).div_ceil(8),
(TestPngColor::Grayscale | TestPngColor::Indexed, TestPngDepth::Eight) => w as usize,
(TestPngColor::Rgb, TestPngDepth::Eight) => w as usize * 3,
(TestPngColor::Rgb, TestPngDepth::One) => unreachable!(),
(TestPngColor::Rgb, TestPngDepth::One) => panic!("one-bit RGB is not a valid PNG test fixture"),
};
let mut raw = Vec::with_capacity((1 + row_bytes) * h as usize);
for row in data.chunks_exact(row_bytes) {