refactor: remove once_cell dependency and use std::sync equivalents (#4185)

This commit is contained in:
Falk Woldmann authored and GitHub committed 2025-05-25 16:09:56 +01:00
1 parent 1d954c2f6f
commit 3c3256ec02
22 files changed
+22 -47

No files matched your search

+3 -3
View File
@@ -1,6 +1,6 @@
use crate::{Result, TraceSrc};
use once_cell::sync::Lazy;
use serde::{Deserialize, Serialize};
use std::sync::LazyLock;
use std::{fs, path::PathBuf, sync::Arc};
use tracing::{error, trace, warn};
@@ -33,8 +33,8 @@ pub(crate) struct CliSettings {
impl CliSettings {
/// Load the settings from the local, global, or default config in that order
pub(crate) fn load() -> Arc<Self> {
static SETTINGS: Lazy<Arc<CliSettings>> =
Lazy::new(|| Arc::new(CliSettings::global_or_default()));
static SETTINGS: LazyLock<Arc<CliSettings>> =
LazyLock::new(|| Arc::new(CliSettings::global_or_default()));
SETTINGS.clone()
}