Reformat code

This commit is contained in:
2025-10-15 21:57:33 +08:00
parent a776e55187
commit d033d8b93f
19 changed files with 206 additions and 194 deletions

View File

@@ -1,16 +1,13 @@
use std::path::PathBuf;
use directories::BaseDirs;
use lazy_static::lazy_static;
use std::path::PathBuf;
const APP_DIR_NAME: &str = "sus_manager";
lazy_static!(
lazy_static! {
static ref BASE_DIRS: BaseDirs = BaseDirs::new().unwrap();
pub static ref APP_CONFIG_DIR: PathBuf = BASE_DIRS.config_dir().to_path_buf()
.join(APP_DIR_NAME);
pub static ref APP_DATA_DIR: PathBuf = BASE_DIRS.data_dir().to_path_buf()
.join(APP_DIR_NAME);
pub static ref APP_CACHE_PATH: PathBuf = BASE_DIRS.cache_dir().to_path_buf()
.join(APP_DIR_NAME);
pub static ref APP_CONIFG_FILE_PATH: PathBuf = APP_CONFIG_DIR.clone()
.join("config.ini");
);
pub static ref APP_CONFIG_DIR: PathBuf =
BASE_DIRS.config_dir().to_path_buf().join(APP_DIR_NAME);
pub static ref APP_DATA_DIR: PathBuf = BASE_DIRS.data_dir().to_path_buf().join(APP_DIR_NAME);
pub static ref APP_CACHE_PATH: PathBuf = BASE_DIRS.cache_dir().to_path_buf().join(APP_DIR_NAME);
pub static ref APP_CONIFG_FILE_PATH: PathBuf = APP_CONFIG_DIR.clone().join("config.ini");
}