refactor: rm code

This commit is contained in:
GyDi
2022-11-17 23:21:13 +08:00
parent 58e9cb8b93
commit d733d9fd4c
5 changed files with 5 additions and 548 deletions

View File

@@ -108,14 +108,11 @@ pub fn clash_pid_path() -> PathBuf {
unsafe { RESOURCE_DIR.clone().unwrap().join("clash.pid") }
}
#[cfg(windows)]
static SERVICE_PATH: &str = "clash-verge-service.exe";
#[cfg(windows)]
pub fn service_path() -> PathBuf {
unsafe {
let res_dir = RESOURCE_DIR.clone().unwrap();
res_dir.join(SERVICE_PATH)
res_dir.join("clash-verge-service.exe")
}
}
@@ -134,7 +131,7 @@ pub fn service_log_file() -> PathBuf {
log_file
}
pub fn path_to_str(path: &PathBuf) -> anyhow::Result<&str> {
pub fn path_to_str(path: &PathBuf) -> Result<&str> {
let path_str = path
.as_os_str()
.to_str()