From bace62b8e30a3ddc698cfc5aacbe5c75919b7d88 Mon Sep 17 00:00:00 2001 From: Gwilym Inzani Date: Fri, 14 Apr 2023 21:16:12 +0100 Subject: [PATCH] Don't use nightly only function --- agb-image-converter/src/image_loader.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/agb-image-converter/src/image_loader.rs b/agb-image-converter/src/image_loader.rs index 81c8fff8..a7909ce0 100644 --- a/agb-image-converter/src/image_loader.rs +++ b/agb-image-converter/src/image_loader.rs @@ -12,10 +12,7 @@ pub(crate) struct Image { impl Image { pub fn load_from_file(image_path: &path::Path) -> Self { - let img = if image_path - .extension() - .is_some_and(|extension| extension == OsStr::new("aseprite")) - { + let img = if image_path.extension() == Some(OsStr::new("aseprite")) { let ase = asefile::AsepriteFile::read_file(image_path).expect("failed to read aseprite file"); DynamicImage::ImageRgba8(ase.frame(0).image())