mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
Don't use nightly only function
This commit is contained in:
parent
293bb15c7b
commit
bace62b8e3
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue