mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-03 21:47:05 +08:00
refactor(deps): replace once_cell with std OnceLock and LazyLock (#8136)
This commit is contained in:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user