summaryrefslogtreecommitdiffstats
path: root/library/std/src/sys/windows/rand.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/sys/windows/rand.rs')
-rw-r--r--library/std/src/sys/windows/rand.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/library/std/src/sys/windows/rand.rs b/library/std/src/sys/windows/rand.rs
index bca4e38d9..5d8fd1378 100644
--- a/library/std/src/sys/windows/rand.rs
+++ b/library/std/src/sys/windows/rand.rs
@@ -1,5 +1,3 @@
-use crate::ffi::c_void;
-use crate::io;
use crate::mem;
use crate::ptr;
use crate::sys::c;
@@ -25,6 +23,9 @@ pub fn hashmap_random_keys() -> (u64, u64) {
#[cfg(not(target_vendor = "uwp"))]
#[inline(never)]
fn fallback_rng() -> (u64, u64) {
+ use crate::ffi::c_void;
+ use crate::io;
+
let mut v = (0, 0);
let ret = unsafe {
c::RtlGenRandom(&mut v as *mut _ as *mut c_void, mem::size_of_val(&v) as c::ULONG)