From 38fbad10788cfd4f9f5e48adbe65806fa5d31100 Mon Sep 17 00:00:00 2001 From: G2-Games Date: Mon, 11 Mar 2024 04:15:44 -0500 Subject: [PATCH] Switched to `g2-unicode-jp` fork, fixed compilation error on wasm --- Cargo.toml | 8 ++++---- src/netmd/utils.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index bbeffcf..3138b17 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "minidisc_rs" +name = "minidisc" version = "0.1.0" edition = "2021" homepage = "https://github.com/G2-Games/minidisc-cli/" repository = "https://github.com/G2-Games/minidisc-cli/minidisc-rs/" -description = "A library for controlling and uploading data to NetMD and Hi-MD minidisc devices." +description = "A library for interacting with NetMD and Hi-MD minidisc devices." license-file = "LICENSE" -authors = ["G2 "] +authors = ["G2 ", "Asivery"] readme = "README.md" # Have docs.rs make documentation for most supported targets @@ -33,7 +33,7 @@ des = "0.8" cbc = "0.1" ecb = "0.1" tokio = { version = "1.36", features = ["sync"] } -unicode-jp = { git = "https://github.com/uzabase/unicode-jp-rs.git" } +g2-unicode-jp = "0.4.1" thiserror = "1.0.57" [target.'cfg(target_family = "wasm")'.dependencies] diff --git a/src/netmd/utils.rs b/src/netmd/utils.rs index 1c63dff..319bdc0 100644 --- a/src/netmd/utils.rs +++ b/src/netmd/utils.rs @@ -14,7 +14,7 @@ pub async fn cross_sleep(duration: Duration) { std::thread::sleep(duration); #[cfg(target_family = "wasm")] - gloo::timers::future::TimeoutFuture::new(duration.as_millis()).await; + gloo::timers::future::TimeoutFuture::new(duration.as_millis() as u32).await; } pub fn bcd_to_int(mut bcd: i32) -> i32 {