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:
2
crates/cache/Cargo.toml
vendored
2
crates/cache/Cargo.toml
vendored
@@ -31,7 +31,7 @@ rustix = { version = "0.35.6", features = ["process"] }
|
||||
|
||||
[dev-dependencies]
|
||||
filetime = "0.2.7"
|
||||
lazy_static = "1.3.0"
|
||||
once_cell = "1.12.0"
|
||||
more-asserts = "0.2.1"
|
||||
pretty_env_logger = "0.4.0"
|
||||
tempfile = "3"
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
use lazy_static::lazy_static;
|
||||
use once_cell::sync::Lazy;
|
||||
use std::time::{Duration, SystemTime, SystemTimeError};
|
||||
|
||||
lazy_static! {
|
||||
pub static ref NOW: SystemTime = SystemTime::now(); // no need for RefCell and set_now() for now
|
||||
}
|
||||
pub static NOW: Lazy<SystemTime> = Lazy::new(SystemTime::now);
|
||||
|
||||
#[derive(PartialOrd, PartialEq, Ord, Eq)]
|
||||
pub struct SystemTimeStub(SystemTime);
|
||||
|
||||
Reference in New Issue
Block a user