mirror of
https://github.com/nushell/nushell.git
synced 2025-08-14 16:38:36 +02:00
replace lazy_static with once_cell (#7502)
replacing the dependence on `lazy_static` with `once_cell`, this will ensure that variables are initialized when needed instead of startup time.
This commit is contained in:
@ -14,7 +14,7 @@ doctest = false
|
||||
nu-path = { path="../nu-path", version = "0.72.2" }
|
||||
nu-glob = { path = "../nu-glob", version = "0.72.2" }
|
||||
nu-utils = { path="../nu-utils", version = "0.72.2" }
|
||||
lazy_static = "1.4.0"
|
||||
once_cell = "1.16.0"
|
||||
num-format = "0.4.3"
|
||||
|
||||
getset = "0.1.1"
|
||||
|
@ -2,12 +2,10 @@
|
||||
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use lazy_static::lazy_static;
|
||||
use nu_utils::locale::LOCALE_OVERRIDE_ENV_VAR;
|
||||
use once_cell::sync::Lazy;
|
||||
|
||||
lazy_static! {
|
||||
static ref LOCALE_OVERRIDE_MUTEX: Arc<Mutex<()>> = Arc::new(Mutex::new(()));
|
||||
}
|
||||
static LOCALE_OVERRIDE_MUTEX: Lazy<Arc<Mutex<()>>> = Lazy::new(Default::default);
|
||||
|
||||
/// Run a closure in a fake locale environment.
|
||||
///
|
||||
|
Reference in New Issue
Block a user