Replace lazy_static with std::sync::LazyLock (#16066)

Closes #15860 

Since rust std now supports LazyLock replacing lazy_static with it
reduce the external dependency.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
Sinan Gençoğlu 2024-08-20 20:27:33 +02:00 committed by GitHub
parent 85731dfe8e
commit ff7017c308
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 160 additions and 195 deletions

View file

@ -20,7 +20,6 @@ futures.workspace = true
git.workspace = true
git2.workspace = true
gpui.workspace = true
lazy_static.workspace = true
libc.workspace = true
parking_lot.workspace = true
paths.workspace = true

View file

@ -794,9 +794,8 @@ impl FakeFsState {
}
#[cfg(any(test, feature = "test-support"))]
lazy_static::lazy_static! {
pub static ref FS_DOT_GIT: &'static OsStr = OsStr::new(".git");
}
pub static FS_DOT_GIT: std::sync::LazyLock<&'static OsStr> =
std::sync::LazyLock::new(|| OsStr::new(".git"));
#[cfg(any(test, feature = "test-support"))]
impl FakeFs {