diff --git a/Cargo.toml b/Cargo.toml index 59dd51b..2c89491 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,9 +12,9 @@ categories = ["algorithms"] license = "MIT" [dependencies] -num-complex = { version = "0.4.0", features = ["serde", "rand"] } +num-complex = { git = "https://github.com/Dirreke/num-complex.git", branch="bump-rand", features = ["serde", "rand"] } num-traits = "0.2.14" -rand = "0.8.3" +rand = "0.9.0" serde = "1.0.124" [package.metadata.release] diff --git a/src/lib.rs b/src/lib.rs index dc8a64f..72f0a2c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -39,7 +39,7 @@ use num_complex::Complex; use num_traits::{Float, FromPrimitive, NumAssign, NumCast, NumOps, ToPrimitive, Zero}; -use rand::{distributions::Standard, prelude::*}; +use rand::{distr::StandardUniform, Rng}; use serde::{Deserialize, Serialize}; use std::fmt::{Debug, Display, LowerExp, UpperExp}; use std::iter::{Product, Sum}; @@ -125,7 +125,7 @@ pub trait Scalar: fn atanh(self) -> Self; /// Generate an random number from - /// [rand::distributions::Standard](https://docs.rs/rand/0.7.2/rand/distributions/struct.Standard.html) + /// [rand::distr::StandardUniform](https://docs.rs/rand/0.9.0/rand/distr/struct.StandardUniform.html) fn rand(rng: &mut impl Rng) -> Self; } @@ -223,7 +223,7 @@ macro_rules! impl_scalar { } fn rand(rng: &mut impl Rng) -> Self { - rng.sample(Standard) + rng.sample(StandardUniform) } impl_with_real!(add_real, +); @@ -313,7 +313,7 @@ macro_rules! impl_scalar { } fn rand(rng: &mut impl Rng) -> Self { - rng.sample(Standard) + rng.sample(StandardUniform) } impl_with_real!(add_real, +);