From 8823c460fc71e185e14af62670c872dea5f0c895 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com> Date: Wed, 23 Dec 2020 22:12:16 +0100 Subject: [PATCH 1/2] rand: update to 0.8 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com> --- Cargo.toml | 4 ++-- tests/channel.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 93f783ccc..1ca61fb8a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -99,10 +99,10 @@ wasm-bindgen-test = "0.3.10" [dev-dependencies] femme = "2.1.1" -rand = "0.7.3" +rand = "0.8.0" tempfile = "3.1.0" futures = "0.3.4" -rand_xorshift = "0.2.0" +rand_xorshift = "0.3.0" [[test]] name = "stream" diff --git a/tests/channel.rs b/tests/channel.rs index 181a5d2ce..f9eacb6db 100644 --- a/tests/channel.rs +++ b/tests/channel.rs @@ -345,8 +345,8 @@ fn drops() { for _ in 0..RUNS { let mut rng = rand_xorshift::XorShiftRng::seed_from_u64(0); task::block_on(async move { - let steps = rng.gen_range(0, 10_000); - let additional = rng.gen_range(0, 50); + let steps = rng.gen_range(0..10_000); + let additional = rng.gen_range(0..50); DROPS.store(0, Ordering::SeqCst); let (s, r) = channel::<DropCounter>(50); From dbbf311344243a3fcabbc8ba2faf26c739740750 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com> Date: Wed, 23 Dec 2020 22:22:10 +0100 Subject: [PATCH 2/2] try to fix wasm Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com> --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 1ca61fb8a..63f095726 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -96,6 +96,7 @@ futures-channel = { version = "0.3.4", optional = true } [target.'cfg(target_arch = "wasm32")'.dev-dependencies] wasm-bindgen-test = "0.3.10" +getrandom = { version = "0.2.0", features = ["js"] } [dev-dependencies] femme = "2.1.1"