Skip to content
This repository was archived by the owner on Jul 10, 2023. It is now read-only.

Commit 9e12df0

Browse files
committed
Use the current usize suffix.
1 parent 9fe130f commit 9e12df0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ pub fn load_png_from_memory(image: &[u8]) -> Result<Image,String> {
144144
let (color_type, pixel_width) = match (updated_color_type as c_int, updated_bit_depth) {
145145
(ffi::COLOR_TYPE_RGB, 8) |
146146
(ffi::COLOR_TYPE_RGBA, 8) |
147-
(ffi::COLOR_TYPE_PALETTE, 8) => (PixelsByColorType::RGBA8 as fn(Vec<u8>) -> PixelsByColorType, 4us),
148-
(ffi::COLOR_TYPE_GRAY, 8) => (PixelsByColorType::K8 as fn(Vec<u8>) -> PixelsByColorType, 1us),
149-
(ffi::COLOR_TYPE_GA, 8) => (PixelsByColorType::KA8 as fn(Vec<u8>) -> PixelsByColorType, 2us),
147+
(ffi::COLOR_TYPE_PALETTE, 8) => (PixelsByColorType::RGBA8 as fn(Vec<u8>) -> PixelsByColorType, 4usize),
148+
(ffi::COLOR_TYPE_GRAY, 8) => (PixelsByColorType::K8 as fn(Vec<u8>) -> PixelsByColorType, 1usize),
149+
(ffi::COLOR_TYPE_GA, 8) => (PixelsByColorType::KA8 as fn(Vec<u8>) -> PixelsByColorType, 2usize),
150150
_ => panic!("color type not supported"),
151151
};
152152

0 commit comments

Comments
 (0)