Skip to content

Commit e2c8257

Browse files
committed
Fixed to build on Rust 1.28
Using Self::Variant on enum's was added in 1.37.0. This commit goes back to using the old method of using the actual enum type.
1 parent 8734980 commit e2c8257

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/decoder.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ impl PixelFormat {
4040
/// Determine the size in bytes of each pixel in this format
4141
pub fn pixel_size(&self) -> usize {
4242
match self {
43-
Self::L8 => 1,
44-
Self::RGB24 => 3,
45-
Self::CMYK32 => 4,
43+
PixelFormat::L8 => 1,
44+
PixelFormat::RGB24 => 3,
45+
PixelFormat::CMYK32 => 4,
4646
}
4747
}
4848
}

0 commit comments

Comments
 (0)