diff options
| author | Thom Chiovoloni <thom@shift.click> | 2022-11-20 16:55:41 -0800 |
|---|---|---|
| committer | Thom Chiovoloni <thom@shift.click> | 2023-01-04 14:52:41 -0800 |
| commit | a4bf36e87bdec61240fb3040774d008c70acbfbb (patch) | |
| tree | 0d742d0fae99a7f6ce94d6d0f12f4086fe5ae890 /library/std/src/sync | |
| parent | 659e169d37990b9c730a59a96081f2ef7afbe8f1 (diff) | |
| download | rust-a4bf36e87bdec61240fb3040774d008c70acbfbb.tar.gz rust-a4bf36e87bdec61240fb3040774d008c70acbfbb.zip | |
Update rand in the stdlib tests, and remove the getrandom feature from it
Diffstat (limited to 'library/std/src/sync')
| -rw-r--r-- | library/std/src/sync/rwlock/tests.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/sync/rwlock/tests.rs b/library/std/src/sync/rwlock/tests.rs index b5b3ad9898e..1a9d3d3f12f 100644 --- a/library/std/src/sync/rwlock/tests.rs +++ b/library/std/src/sync/rwlock/tests.rs @@ -2,7 +2,7 @@ use crate::sync::atomic::{AtomicUsize, Ordering}; use crate::sync::mpsc::channel; use crate::sync::{Arc, RwLock, RwLockReadGuard, TryLockError}; use crate::thread; -use rand::{self, Rng}; +use rand::Rng; #[derive(Eq, PartialEq, Debug)] struct NonCopy(i32); @@ -28,7 +28,7 @@ fn frob() { let tx = tx.clone(); let r = r.clone(); thread::spawn(move || { - let mut rng = rand::thread_rng(); + let mut rng = crate::test_helpers::test_rng(); for _ in 0..M { if rng.gen_bool(1.0 / (N as f64)) { drop(r.write().unwrap()); |
