refactor: replace singleton_lazy with singleton macro across multiple modules

This commit is contained in:
Tunglies
2025-11-19 22:40:52 +08:00
parent 108a05ce96
commit d8090277af
6 changed files with 23 additions and 79 deletions
+2 -6
View File
@@ -7,7 +7,7 @@ use tokio::fs;
use crate::config::{Config, ConfigType};
use crate::core::handle;
use crate::singleton_lazy;
use crate::singleton;
use crate::utils::dirs;
use clash_verge_logging::{Type, logging};
@@ -361,8 +361,4 @@ fn contains_any_keyword<'a>(buf: &'a [u8], keywords: &'a [&str]) -> bool {
false
}
singleton_lazy!(
CoreConfigValidator,
CORECONFIGVALIDATOR,
CoreConfigValidator::new
);
singleton!(CoreConfigValidator, CORECONFIGVALIDATOR);