From 5ce9bf9c5a2020151c3e38a98554df9ba91a1a5e Mon Sep 17 00:00:00 2001 From: David Palm Date: Mon, 25 Nov 2024 15:22:21 +0100 Subject: [PATCH] Fix wasm build --- src/hazmat/uniform_sieve.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hazmat/uniform_sieve.rs b/src/hazmat/uniform_sieve.rs index 2c3a4f5..7bb5929 100644 --- a/src/hazmat/uniform_sieve.rs +++ b/src/hazmat/uniform_sieve.rs @@ -40,7 +40,7 @@ use rand_core::CryptoRngCore; #[cfg(feature = "default-rng")] use rand_core::OsRng; -use crate::is_prime; +use crate::is_prime_with_rng; /// Prime search using a uniform sieve. pub trait UniformSieve @@ -204,7 +204,7 @@ where } let mut p = a * m + b; - while !is_prime(&p) { + while !is_prime_with_rng(rng, &p) { a = T::random_bits(rng, a_max_bits); while a >= a_max { a = T::random_bits(rng, a_max_bits);