diff --git a/cmdapp/Cargo.toml b/cmdapp/Cargo.toml index 13252d6..e5fe2d5 100644 --- a/cmdapp/Cargo.toml +++ b/cmdapp/Cargo.toml @@ -14,7 +14,7 @@ keywords = ["svg", "computer-graphics"] clap = "2.33.3" image = "0.23.10" visioncortex = { version = "0.8.8" } -fastrand = "1.8" +fastrand = { version = "2.3", features = ["js"] } pyo3 = { version = "0.19.0", optional = true } [features] diff --git a/cmdapp/src/converter.rs b/cmdapp/src/converter.rs index cfa4fa5..448b5cd 100644 --- a/cmdapp/src/converter.rs +++ b/cmdapp/src/converter.rs @@ -53,7 +53,7 @@ fn find_unused_color_in_image(img: &ColorImage) -> Result { Color::new(0, 255, 255), Color::new(255, 0, 255), ]); - let rng = Rng::new(); + let mut rng = Rng::new(); let random_colors = (0..NUM_UNUSED_COLOR_ITERATIONS).map(|_| Color::new(rng.u8(..), rng.u8(..), rng.u8(..))); for color in special_colors.chain(random_colors) {