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
+2 -3
View File
@@ -10,7 +10,7 @@ mod probe;
use std::{
sync::{
Arc,
Arc, LazyLock,
atomic::{AtomicBool, Ordering},
},
time::Duration,
@@ -19,7 +19,6 @@ use std::{
use anyhow::{Context as _, Result, bail};
use arc_swap::ArcSwap;
use clash_verge_logging::{Type, logging};
use once_cell::sync::Lazy;
use parking_lot::Mutex;
use tokio::sync::Notify;
@@ -35,7 +34,7 @@ use health::StoredService;
use probe::{CurrentServiceProbe, classify_service_health, probe_outcome};
/// The process-wide Run State, observing the real machine.
pub static RUN_STATE: Lazy<RunStateStore<RealEnv>> = Lazy::new(|| RunStateStore::new(RealEnv));
pub static RUN_STATE: LazyLock<RunStateStore<RealEnv>> = LazyLock::new(|| RunStateStore::new(RealEnv));
/// Distinguishes silence from a reply that updated Service health with a rejection.
#[derive(Debug)]