Skip to content

Commit

Permalink
update dependencies to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
Commander07 committed Jun 9, 2024
1 parent 92dc4f0 commit 3833796
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "installer"
version = "1.2.1"
version = "1.2.2"
edition = "2021"
build = "build.rs"

Expand All @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -163,7 +163,7 @@ impl CachedHttpClient {
}

#[cached(
type = "SizedCache<String, Result<CachedResponse, isahc::Error>>",
ty = "SizedCache<String, Result<CachedResponse, isahc::Error>>",
create = "{ SizedCache::with_size(100) }",
convert = r#"{ format!("{}", url) }"#
)]
Expand Down Expand Up @@ -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<u8> = 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)
Expand Down

0 comments on commit 3833796

Please sign in to comment.