refactor: wip

This commit is contained in:
GyDi
2022-11-17 17:07:13 +08:00
parent f5f865a139
commit 84c12dee80
21 changed files with 324 additions and 1498 deletions

View File

@@ -1,7 +1,5 @@
use super::{Draft, IClashTemp, IProfiles, IVerge};
use crate::config::ClashN;
use once_cell::sync::OnceCell;
use serde_yaml::Mapping;
pub struct Config {
clash_config: Draft<IClashTemp>,
@@ -20,18 +18,6 @@ impl Config {
})
}
// pub fn clash<'a>() -> MappedMutexGuard<'a, IClash> {
// Self::global().clash_config.latest()
// }
// pub fn verge<'a>() -> MappedMutexGuard<'a, IVerge> {
// Self::global().verge_config.latest()
// }
// pub fn profiles<'a>() -> MappedMutexGuard<'a, IProfiles> {
// Self::global().profiles_config.latest()
// }
pub fn clash() -> Draft<IClashTemp> {
Self::global().clash_config.clone()
}