Simplify match in invert

This commit is contained in:
Aurelia Molzer committed 2025-09-01 02:12:10 +02:00
1 parent 682ef0c375
commit 1556713d6e
1 file changed
+2 -1
+2 -1
View File
@@ -481,7 +481,8 @@ fn invert_colors(
sample_format: SampleFormat, sample_format: SampleFormat,
) -> TiffResult<()> { ) -> TiffResult<()> {
match (color_type, sample_format) { match (color_type, sample_format) {
(ColorType::Gray(n), SampleFormat::Uint) if 8 % n == 0 => { // Where pixels do not cross a byte boundary
(ColorType::Gray(1 | 2 | 4 | 8), SampleFormat::Uint) => {
for x in buf { for x in buf {
// Equivalent to both of the following: // Equivalent to both of the following:
// //