From ad6c3b57c2fcb628c09be25cb7a9e2396ef8e76b Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Tue, 10 Dec 2024 19:30:51 +0100 Subject: [PATCH] anvil: Don't use type alias for min-ver of `image` --- anvil/Cargo.toml | 2 +- anvil/src/udev.rs | 3 ++- anvil/src/winit.rs | 3 ++- anvil/src/x11.rs | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/anvil/Cargo.toml b/anvil/Cargo.toml index 249fb547d739..528e7a034391 100644 --- a/anvil/Cargo.toml +++ b/anvil/Cargo.toml @@ -9,7 +9,7 @@ version = "0.0.1" [dependencies] bitflags = "2.2.1" fps_ticker = {version = "1.0.0", optional = true} -image = {version = "0.25.1", default-features = false, optional = true} +image = {version = "0.25.1", default-features = false, optional = true, features = ["png"]} rand = "0.8" tracing = { version = "0.1.37", features = ["max_level_trace", "release_max_level_debug"] } tracing-subscriber = { version = "0.3.16", features = ["env-filter"] } diff --git a/anvil/src/udev.rs b/anvil/src/udev.rs index 509fae823b7b..0891dac8455a 100644 --- a/anvil/src/udev.rs +++ b/anvil/src/udev.rs @@ -380,8 +380,9 @@ pub fn run_udev() { #[cfg(feature = "debug")] { + #[allow(deprecated)] let fps_image = - image::ImageReader::with_format(std::io::Cursor::new(FPS_NUMBERS_PNG), image::ImageFormat::Png) + image::io::Reader::with_format(std::io::Cursor::new(FPS_NUMBERS_PNG), image::ImageFormat::Png) .decode() .unwrap(); let fps_texture = renderer diff --git a/anvil/src/winit.rs b/anvil/src/winit.rs index f2ca111966ed..66fb0caaf628 100644 --- a/anvil/src/winit.rs +++ b/anvil/src/winit.rs @@ -126,8 +126,9 @@ pub fn run_winit() { output.set_preferred(mode); #[cfg(feature = "debug")] + #[allow(deprecated)] let fps_image = - image::ImageReader::with_format(std::io::Cursor::new(FPS_NUMBERS_PNG), image::ImageFormat::Png) + image::io::Reader::with_format(std::io::Cursor::new(FPS_NUMBERS_PNG), image::ImageFormat::Png) .decode() .unwrap(); #[cfg(feature = "debug")] diff --git a/anvil/src/x11.rs b/anvil/src/x11.rs index 50e3ce1c92aa..88803754f820 100644 --- a/anvil/src/x11.rs +++ b/anvil/src/x11.rs @@ -205,8 +205,9 @@ pub fn run_x11() { }; #[cfg(feature = "debug")] + #[allow(deprecated)] let fps_image = - image::ImageReader::with_format(std::io::Cursor::new(FPS_NUMBERS_PNG), image::ImageFormat::Png) + image::io::Reader::with_format(std::io::Cursor::new(FPS_NUMBERS_PNG), image::ImageFormat::Png) .decode() .unwrap(); #[cfg(feature = "debug")]