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

This commit is contained in:
Tunglies
2026-10-01 14:34:20 +08:00
committed by GitHub
parent f17ccdc227
commit c8a8d2034c
14 changed files with 30 additions and 28 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
use crate::{core::handle, utils::resolve::window::build_new_window};
use clash_verge_limiter::Limiter;
use clash_verge_logging::{Type, logging};
use once_cell::sync::Lazy;
use std::pin::Pin;
use std::sync::LazyLock;
use std::time::Duration;
use tauri::{Manager as _, WebviewWindow, Wry};
@@ -26,7 +26,7 @@ pub enum WindowState {
}
const WINDOW_OPERATION_DEBOUNCE_MS: u64 = 625;
static WINDOW_OPERATION_LIMITER: Lazy<Limiter> = Lazy::new(|| {
static WINDOW_OPERATION_LIMITER: LazyLock<Limiter> = LazyLock::new(|| {
Limiter::new(
Duration::from_millis(WINDOW_OPERATION_DEBOUNCE_MS),
clash_verge_limiter::SystemClock,