refactor: adjust all path methods and reduce unwrap

This commit is contained in:
GyDi
2022-11-18 09:35:05 +08:00
parent be81cd72af
commit 34daffbc96
11 changed files with 204 additions and 181 deletions

View File

@@ -9,7 +9,7 @@ pub async fn put_configs() -> Result<()> {
let (url, headers) = clash_client_info()?;
let url = format!("{url}/configs");
let runtime_yaml = dirs::clash_runtime_yaml();
let runtime_yaml = dirs::clash_runtime_yaml()?;
let runtime_yaml = dirs::path_to_str(&runtime_yaml)?;
let mut data = HashMap::new();