Remove once_cell dependency from nu-test-support create. (#8568)
I was looking where we could remove the usage of once-cell dependency. As for now, I only found one place. Not a terrible improvement, but at least, it removes a dependency nu-test-support crate. Relies on `Mutex::new` constified in Rust 1.63.0
This commit is contained in:
parent
626410b2aa
commit
0f4a073eaf
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -3039,7 +3039,6 @@ dependencies = [
|
||||||
"nu-path",
|
"nu-path",
|
||||||
"nu-utils",
|
"nu-utils",
|
||||||
"num-format",
|
"num-format",
|
||||||
"once_cell",
|
|
||||||
"tempfile",
|
"tempfile",
|
||||||
"which",
|
"which",
|
||||||
]
|
]
|
||||||
|
|
|
@ -15,7 +15,6 @@ bench = false
|
||||||
nu-path = { path="../nu-path", version = "0.77.2" }
|
nu-path = { path="../nu-path", version = "0.77.2" }
|
||||||
nu-glob = { path = "../nu-glob", version = "0.77.2" }
|
nu-glob = { path = "../nu-glob", version = "0.77.2" }
|
||||||
nu-utils = { path="../nu-utils", version = "0.77.2" }
|
nu-utils = { path="../nu-utils", version = "0.77.2" }
|
||||||
once_cell = "1.16.0"
|
|
||||||
num-format = "0.4.3"
|
num-format = "0.4.3"
|
||||||
which = "4.3.0"
|
which = "4.3.0"
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
#![cfg(debug_assertions)]
|
#![cfg(debug_assertions)]
|
||||||
|
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::Mutex;
|
||||||
|
|
||||||
use nu_utils::locale::LOCALE_OVERRIDE_ENV_VAR;
|
use nu_utils::locale::LOCALE_OVERRIDE_ENV_VAR;
|
||||||
use once_cell::sync::Lazy;
|
|
||||||
|
|
||||||
static LOCALE_OVERRIDE_MUTEX: Lazy<Arc<Mutex<()>>> = Lazy::new(Default::default);
|
static LOCALE_OVERRIDE_MUTEX: Mutex<()> = Mutex::new(());
|
||||||
|
|
||||||
/// Run a closure in a fake locale environment.
|
/// Run a closure in a fake locale environment.
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in New Issue
Block a user