Remove direct dependency on once_cell

This commit is contained in:
Olivier FAURE 2025-04-17 15:16:24 +02:00
parent 324ff2444b
commit 298c2cac9b
3 changed files with 1 additions and 5 deletions

1
Cargo.lock generated
View File

@ -1967,7 +1967,6 @@ dependencies = [
"image", "image",
"insta", "insta",
"keyboard-types", "keyboard-types",
"once_cell",
"oxipng", "oxipng",
"parley", "parley",
"pollster", "pollster",

View File

@ -37,7 +37,6 @@ tree_arena.workspace = true
smallvec.workspace = true smallvec.workspace = true
tracing = { workspace = true, features = ["default"] } tracing = { workspace = true, features = ["default"] }
image.workspace = true image.workspace = true
once_cell = "1.19.0"
serde = { version = "1.0.204", features = ["derive"] } serde = { version = "1.0.204", features = ["derive"] }
serde_json = "1.0.120" serde_json = "1.0.120"
futures-intrusive = "0.5.0" futures-intrusive = "0.5.0"

View File

@ -10,11 +10,9 @@ use std::env;
use std::path::PathBuf; use std::path::PathBuf;
use std::sync::{Arc, Mutex}; use std::sync::{Arc, Mutex};
use once_cell::sync::Lazy;
use serde::Deserialize; use serde::Deserialize;
static WORKSPACES: Lazy<Mutex<BTreeMap<String, Arc<PathBuf>>>> = static WORKSPACES: Mutex<BTreeMap<String, Arc<PathBuf>>> = Mutex::new(BTreeMap::new());
Lazy::new(|| Mutex::new(BTreeMap::new()));
/// Return the cargo workspace for a manifest /// Return the cargo workspace for a manifest
pub(crate) fn get_cargo_workspace(manifest_dir: &str) -> Arc<PathBuf> { pub(crate) fn get_cargo_workspace(manifest_dir: &str) -> Arc<PathBuf> {