File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ pub(crate) use _uuid::make_module;
4
4
mod _uuid {
5
5
use crate :: { builtins:: PyNone , vm:: VirtualMachine } ;
6
6
use mac_address:: get_mac_address;
7
- use once_cell :: sync:: OnceCell ;
7
+ use std :: sync:: OnceLock ;
8
8
use uuid:: { Context , Uuid , timestamp:: Timestamp } ;
9
9
10
10
fn get_node_id ( ) -> [ u8 ; 6 ] {
@@ -19,7 +19,7 @@ mod _uuid {
19
19
static CONTEXT : Context = Context :: new ( 0 ) ;
20
20
let ts = Timestamp :: now ( & CONTEXT ) ;
21
21
22
- static NODE_ID : OnceCell < [ u8 ; 6 ] > = OnceCell :: new ( ) ;
22
+ static NODE_ID : OnceLock < [ u8 ; 6 ] > = OnceLock :: new ( ) ;
23
23
let unique_node_id = NODE_ID . get_or_init ( get_node_id) ;
24
24
25
25
( Uuid :: new_v1 ( ts, unique_node_id) . as_bytes ( ) . to_vec ( ) , PyNone )
Original file line number Diff line number Diff line change @@ -107,8 +107,8 @@ pub struct PyGlobalState {
107
107
}
108
108
109
109
pub fn process_hash_secret_seed ( ) -> u32 {
110
- use once_cell :: sync:: OnceCell ;
111
- static SEED : OnceCell < u32 > = OnceCell :: new ( ) ;
110
+ use std :: sync:: OnceLock ;
111
+ static SEED : OnceLock < u32 > = OnceLock :: new ( ) ;
112
112
* SEED . get_or_init ( rand:: random)
113
113
}
114
114
You can’t perform that action at this time.
0 commit comments