Remove once_cell
dependency (#25769)
Release Notes: - N/A --------- Co-authored-by: Marshall Bowers <git@maxdeviant.com>
This commit is contained in:
parent
df7beb4217
commit
c0ecf8684e
4 changed files with 3 additions and 6 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -3003,7 +3003,6 @@ dependencies = [
|
||||||
"collections",
|
"collections",
|
||||||
"gpui",
|
"gpui",
|
||||||
"linkme",
|
"linkme",
|
||||||
"once_cell",
|
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"theme",
|
"theme",
|
||||||
]
|
]
|
||||||
|
|
|
@ -455,7 +455,6 @@ nanoid = "0.4"
|
||||||
nbformat = { version = "0.10.0" }
|
nbformat = { version = "0.10.0" }
|
||||||
nix = "0.29"
|
nix = "0.29"
|
||||||
num-format = "0.4.4"
|
num-format = "0.4.4"
|
||||||
once_cell = "1.20"
|
|
||||||
ordered-float = "2.1.1"
|
ordered-float = "2.1.1"
|
||||||
palette = { version = "0.7.5", default-features = false, features = ["std"] }
|
palette = { version = "0.7.5", default-features = false, features = ["std"] }
|
||||||
parking_lot = "0.12.1"
|
parking_lot = "0.12.1"
|
||||||
|
|
|
@ -15,7 +15,6 @@ path = "src/component.rs"
|
||||||
collections.workspace = true
|
collections.workspace = true
|
||||||
gpui.workspace = true
|
gpui.workspace = true
|
||||||
linkme.workspace = true
|
linkme.workspace = true
|
||||||
once_cell.workspace = true
|
|
||||||
parking_lot.workspace = true
|
parking_lot.workspace = true
|
||||||
theme.workspace = true
|
theme.workspace = true
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
use std::ops::{Deref, DerefMut};
|
use std::ops::{Deref, DerefMut};
|
||||||
|
use std::sync::LazyLock;
|
||||||
|
|
||||||
use collections::HashMap;
|
use collections::HashMap;
|
||||||
use gpui::{div, prelude::*, px, AnyElement, App, IntoElement, RenderOnce, SharedString, Window};
|
use gpui::{div, prelude::*, px, AnyElement, App, IntoElement, RenderOnce, SharedString, Window};
|
||||||
use linkme::distributed_slice;
|
use linkme::distributed_slice;
|
||||||
use once_cell::sync::Lazy;
|
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
use theme::ActiveTheme;
|
use theme::ActiveTheme;
|
||||||
|
|
||||||
|
@ -27,8 +27,8 @@ pub static __ALL_COMPONENTS: [fn()] = [..];
|
||||||
#[distributed_slice]
|
#[distributed_slice]
|
||||||
pub static __ALL_PREVIEWS: [fn()] = [..];
|
pub static __ALL_PREVIEWS: [fn()] = [..];
|
||||||
|
|
||||||
pub static COMPONENT_DATA: Lazy<RwLock<ComponentRegistry>> =
|
pub static COMPONENT_DATA: LazyLock<RwLock<ComponentRegistry>> =
|
||||||
Lazy::new(|| RwLock::new(ComponentRegistry::new()));
|
LazyLock::new(|| RwLock::new(ComponentRegistry::new()));
|
||||||
|
|
||||||
pub struct ComponentRegistry {
|
pub struct ComponentRegistry {
|
||||||
components: Vec<(Option<&'static str>, &'static str, Option<&'static str>)>,
|
components: Vec<(Option<&'static str>, &'static str, Option<&'static str>)>,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue