refactor(deps): replace once_cell with std OnceLock and LazyLock (#8136)

This commit is contained in:
Tunglies
2026-10-07 07:38:56 +00:00
committed by GitHub
parent 720dc13e96
commit d01f43cc78
14 changed files with 24 additions and 33 deletions
+1 -2
View File
@@ -15,7 +15,6 @@ use crate::{
use anyhow::{Context as _, Result, anyhow, bail};
use clash_verge_draft::DraftTransaction;
use clash_verge_logging::{Type, logging};
use once_cell::sync::Lazy;
use parking_lot::Mutex;
use serde_yaml_ng::Value;
use std::{collections::HashSet, net::SocketAddr, str::FromStr as _};
@@ -26,7 +25,7 @@ struct MixedPortFallback {
current: u16,
}
static PENDING_FALLBACK_NOTICE: Lazy<Mutex<Option<MixedPortFallback>>> = Lazy::new(|| Mutex::new(None));
static PENDING_FALLBACK_NOTICE: Mutex<Option<MixedPortFallback>> = Mutex::new(None);
static STARTUP_CORE_BLOCK_REASON: Mutex<Option<String>> = Mutex::new(None);
impl Config {