refactor: wip

This commit is contained in:
GyDi
2022-11-16 01:26:41 +08:00
parent 902aed671a
commit f5f865a139
11 changed files with 247 additions and 90 deletions

View File

@@ -12,6 +12,7 @@ use std::collections::HashMap;
use std::sync::Arc;
use std::{fs, io::Write};
#[deprecated]
pub struct ProfilesN {
pub config: Arc<Mutex<IProfiles>>,
}
@@ -87,6 +88,10 @@ macro_rules! patch {
}
impl IProfiles {
pub fn new() -> Self {
Self::read_file()
}
/// read the config from the file
pub fn read_file() -> Self {
let mut profiles = config::read_yaml::<Self>(dirs::profiles_path());