File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 2
2
3
3
use crate :: logging:: stderr_log_callback;
4
4
use crate :: logging:: Logger ;
5
- use lazy_static :: lazy_static ;
5
+ use std :: sync :: LazyLock ;
6
6
use std:: sync:: RwLock ;
7
7
use tokio:: runtime:: Runtime ;
8
8
@@ -110,13 +110,13 @@ pub mod cass_uuid_types {
110
110
include_bindgen_generated ! ( "cppdriver_uuid_types.rs" ) ;
111
111
}
112
112
113
- lazy_static ! {
114
- pub static ref RUNTIME : Runtime = Runtime :: new( ) . unwrap ( ) ;
115
- pub static ref LOGGER : RwLock < Logger > = RwLock :: new( Logger {
113
+ pub static RUNTIME : LazyLock < Runtime > = LazyLock :: new ( || Runtime :: new ( ) . unwrap ( ) ) ;
114
+ pub static LOGGER : LazyLock < RwLock < Logger > > = LazyLock :: new ( || {
115
+ RwLock :: new ( Logger {
116
116
cb : Some ( stderr_log_callback) ,
117
117
data : std:: ptr:: null_mut ( ) ,
118
- } ) ;
119
- }
118
+ } )
119
+ } ) ;
120
120
121
121
// To send a Rust object to C:
122
122
You can’t perform that action at this time.
0 commit comments