File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,9 @@ use std::fs::File;
1515use std:: io;
1616use std:: io:: Read ;
1717use std:: cell:: RefCell ;
18- use std:: sync:: atomic:: { AtomicBool , ATOMIC_BOOL_INIT , Ordering } ;
18+ use std:: sync:: atomic:: { AtomicBool , Ordering } ;
1919
20- static RNG_INIT : AtomicBool = ATOMIC_BOOL_INIT ;
20+ static RNG_INIT : AtomicBool = AtomicBool :: new ( false ) ;
2121
2222enum RngSource {
2323 GetRandom ,
@@ -67,7 +67,7 @@ fn is_getrandom_available() -> bool {
6767 use std:: sync:: { Once , ONCE_INIT } ;
6868
6969 static CHECKER : Once = ONCE_INIT ;
70- static AVAILABLE : AtomicBool = ATOMIC_BOOL_INIT ;
70+ static AVAILABLE : AtomicBool = AtomicBool :: new ( false ) ;
7171
7272 CHECKER . call_once ( || {
7373 let mut buf: [ u8 ; 0 ] = [ ] ;
Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ use super::utils::use_init;
1313use std:: fs:: File ;
1414use std:: io:: Read ;
1515use std:: cell:: RefCell ;
16- use std:: sync:: atomic:: { AtomicBool , ATOMIC_BOOL_INIT , Ordering } ;
16+ use std:: sync:: atomic:: { AtomicBool , Ordering } ;
1717
18- static RNG_INIT : AtomicBool = ATOMIC_BOOL_INIT ;
18+ static RNG_INIT : AtomicBool = AtomicBool :: new ( false ) ;
1919
2020thread_local ! ( static RNG_FILE : RefCell <Option <File >> = RefCell :: new( None ) ) ;
2121
You can’t perform that action at this time.
0 commit comments