Simplify match in invert
This commit is contained in:
1 parent
682ef0c375
commit
1556713d6e
1 file changed
+2
-1
+2
-1
@@ -481,7 +481,8 @@ fn invert_colors(
|
||||
sample_format: SampleFormat,
|
||||
) -> TiffResult<()> {
|
||||
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 {
|
||||
// Equivalent to both of the following:
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user