mirror of
https://github.com/async-rs/async-std.git
synced 2025-01-16 10:49:55 +00:00
Merge pull request #923 from Keruspe/rand
This commit is contained in:
commit
1184a7f97f
2 changed files with 5 additions and 4 deletions
|
@ -96,13 +96,14 @@ futures-channel = { version = "0.3.4", optional = true }
|
||||||
|
|
||||||
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
|
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
|
||||||
wasm-bindgen-test = "0.3.10"
|
wasm-bindgen-test = "0.3.10"
|
||||||
|
getrandom = { version = "0.2.0", features = ["js"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
femme = "2.1.1"
|
femme = "2.1.1"
|
||||||
rand = "0.7.3"
|
rand = "0.8.0"
|
||||||
tempfile = "3.1.0"
|
tempfile = "3.1.0"
|
||||||
futures = "0.3.4"
|
futures = "0.3.4"
|
||||||
rand_xorshift = "0.2.0"
|
rand_xorshift = "0.3.0"
|
||||||
|
|
||||||
[[test]]
|
[[test]]
|
||||||
name = "stream"
|
name = "stream"
|
||||||
|
|
|
@ -345,8 +345,8 @@ fn drops() {
|
||||||
for _ in 0..RUNS {
|
for _ in 0..RUNS {
|
||||||
let mut rng = rand_xorshift::XorShiftRng::seed_from_u64(0);
|
let mut rng = rand_xorshift::XorShiftRng::seed_from_u64(0);
|
||||||
task::block_on(async move {
|
task::block_on(async move {
|
||||||
let steps = rng.gen_range(0, 10_000);
|
let steps = rng.gen_range(0..10_000);
|
||||||
let additional = rng.gen_range(0, 50);
|
let additional = rng.gen_range(0..50);
|
||||||
|
|
||||||
DROPS.store(0, Ordering::SeqCst);
|
DROPS.store(0, Ordering::SeqCst);
|
||||||
let (s, r) = channel::<DropCounter>(50);
|
let (s, r) = channel::<DropCounter>(50);
|
||||||
|
|
Loading…
Reference in a new issue