diff --git a/Cargo.toml b/Cargo.toml index 332a056..d25aa84 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "installer" -version = "1.2.1" +version = "1.2.2" edition = "2021" build = "build.rs" @@ -17,18 +17,18 @@ incremental = false [dependencies] -base64 = "0.21.0" +base64 = "0.22.1" chrono = "0.4.24" dirs = "5.0.0" -image = "0.24.6" +image = "0.25.1" serde = { version = "1", features = ["derive"] } serde_json = "1" async-trait = "0.1.68" futures = "0.3.28" isahc = "1.7.2" -zip = "0.6.4" +zip = "2.1.3" dioxus = { version = "0.5.1", features = ["desktop"] } -cached = "0.43.0" +cached = { version = "0.51.3", features = ["async"] } regex = "1.8.1" rfd = "0.14.0" log = "0.4.21" diff --git a/src/main.rs b/src/main.rs index e05ffe7..194ea77 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,7 +12,7 @@ use dioxus::prelude::LaunchBuilder; use dioxus::desktop::{Config as DioxusConfig, LogicalSize, WindowBuilder}; use futures::StreamExt; use image::io::Reader as ImageReader; -use image::{DynamicImage, ImageOutputFormat}; +use image::{DynamicImage, ImageFormat}; use isahc::config::RedirectPolicy; use isahc::http::StatusCode; use isahc::prelude::Configurable; @@ -163,7 +163,7 @@ impl CachedHttpClient { } #[cached( - type = "SizedCache>", + ty = "SizedCache>", create = "{ SizedCache::with_size(100) }", convert = r#"{ format!("{}", url) }"# )] @@ -909,7 +909,7 @@ fn get_modpack_root(launcher: &Launcher, uuid: &str) -> PathBuf { fn image_to_base64(img: &DynamicImage) -> String { let mut image_data: Vec = Vec::new(); - img.write_to(&mut Cursor::new(&mut image_data), ImageOutputFormat::Png) + img.write_to(&mut Cursor::new(&mut image_data), ImageFormat::Png) .unwrap(); let res_base64 = engine::general_purpose::STANDARD.encode(image_data); format!("data:image/png;base64,{}", res_base64)