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;
15
15
use std:: io;
16
16
use std:: io:: Read ;
17
17
use std:: cell:: RefCell ;
18
- use std:: sync:: atomic:: { AtomicBool , ATOMIC_BOOL_INIT , Ordering } ;
18
+ use std:: sync:: atomic:: { AtomicBool , Ordering } ;
19
19
20
- static RNG_INIT : AtomicBool = ATOMIC_BOOL_INIT ;
20
+ static RNG_INIT : AtomicBool = AtomicBool :: new ( false ) ;
21
21
22
22
enum RngSource {
23
23
GetRandom ,
@@ -67,7 +67,7 @@ fn is_getrandom_available() -> bool {
67
67
use std:: sync:: { Once , ONCE_INIT } ;
68
68
69
69
static CHECKER : Once = ONCE_INIT ;
70
- static AVAILABLE : AtomicBool = ATOMIC_BOOL_INIT ;
70
+ static AVAILABLE : AtomicBool = AtomicBool :: new ( false ) ;
71
71
72
72
CHECKER . call_once ( || {
73
73
let mut buf: [ u8 ; 0 ] = [ ] ;
Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ use super::utils::use_init;
13
13
use std:: fs:: File ;
14
14
use std:: io:: Read ;
15
15
use std:: cell:: RefCell ;
16
- use std:: sync:: atomic:: { AtomicBool , ATOMIC_BOOL_INIT , Ordering } ;
16
+ use std:: sync:: atomic:: { AtomicBool , Ordering } ;
17
17
18
- static RNG_INIT : AtomicBool = ATOMIC_BOOL_INIT ;
18
+ static RNG_INIT : AtomicBool = AtomicBool :: new ( false ) ;
19
19
20
20
thread_local ! ( static RNG_FILE : RefCell <Option <File >> = RefCell :: new( None ) ) ;
21
21
You can’t perform that action at this time.
0 commit comments