Migrate most of wasmtime from lazy_static to once_cell (#4368)
* Update tracing-core to a version which doesn't depend on lazy-static. * Update crossbeam-utils to a version that doesn't depend on lazy-static. * Update crossbeam-epoch to a version that doesn't depend on lazy-static. * Update clap to a version that doesn't depend on lazy-static. * Convert Wasmtime's own use of lazy_static to once_cell. * Make `GDB_REGISTRATION`'s comment a doc comment. * Fix compilation on Windows.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use once_cell::sync::Lazy;
|
||||
use std::path::Path;
|
||||
use std::sync::{Condvar, Mutex};
|
||||
use wasmtime::{
|
||||
@@ -118,9 +119,7 @@ fn feature_found(path: &Path, name: &str) -> bool {
|
||||
fn lock_pooling() -> impl Drop {
|
||||
const MAX_CONCURRENT_POOLING: u32 = 8;
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
static ref ACTIVE: MyState = MyState::default();
|
||||
}
|
||||
static ACTIVE: Lazy<MyState> = Lazy::new(MyState::default);
|
||||
|
||||
#[derive(Default)]
|
||||
struct MyState {
|
||||
|
||||
Reference in New Issue
Block a user