about summary refs log tree commit diff
path: root/library/std/src/sys/pal/unix/rand.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/sys/pal/unix/rand.rs')
-rw-r--r--library/std/src/sys/pal/unix/rand.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/library/std/src/sys/pal/unix/rand.rs b/library/std/src/sys/pal/unix/rand.rs
index e6df109a6b8..8a78ea8e7cc 100644
--- a/library/std/src/sys/pal/unix/rand.rs
+++ b/library/std/src/sys/pal/unix/rand.rs
@@ -24,7 +24,6 @@ pub fn hashmap_random_keys() -> (u64, u64) {
 mod imp {
     use crate::fs::File;
     use crate::io::Read;
-
     #[cfg(any(target_os = "linux", target_os = "android"))]
     use crate::sys::weak::syscall;
 
@@ -178,9 +177,10 @@ mod imp {
 
 #[cfg(target_vendor = "apple")]
 mod imp {
-    use crate::io;
     use libc::{c_int, c_void, size_t};
 
+    use crate::io;
+
     #[inline(always)]
     fn random_failure() -> ! {
         panic!("unexpected random generation error: {}", io::Error::last_os_error());
@@ -311,8 +311,10 @@ mod imp {
 
 #[cfg(target_os = "vxworks")]
 mod imp {
+    use core::sync::atomic::AtomicBool;
+    use core::sync::atomic::Ordering::Relaxed;
+
     use crate::io;
-    use core::sync::atomic::{AtomicBool, Ordering::Relaxed};
 
     pub fn fill_bytes(v: &mut [u8]) {
         static RNG_INIT: AtomicBool = AtomicBool::new(false);