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/alloc/src/collections/binary_heap | |
| 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/alloc/src/collections/binary_heap')
| -rw-r--r-- | library/alloc/src/collections/binary_heap/tests.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/collections/binary_heap/tests.rs b/library/alloc/src/collections/binary_heap/tests.rs index fe08e0e10e8..59c516374c0 100644 --- a/library/alloc/src/collections/binary_heap/tests.rs +++ b/library/alloc/src/collections/binary_heap/tests.rs @@ -465,7 +465,7 @@ fn test_retain() { #[test] #[cfg(not(target_os = "emscripten"))] fn panic_safe() { - use rand::{seq::SliceRandom, thread_rng}; + use rand::seq::SliceRandom; use std::cmp; use std::panic::{self, AssertUnwindSafe}; use std::sync::atomic::{AtomicUsize, Ordering}; @@ -490,7 +490,7 @@ fn panic_safe() { self.0.partial_cmp(&other.0) } } - let mut rng = thread_rng(); + let mut rng = crate::test_helpers::test_rng(); const DATASZ: usize = 32; // Miri is too slow let ntest = if cfg!(miri) { 1 } else { 10 }; |
