refactor(profile): improve error handling for file not found case

refactor(merge): simplify deep_merge function signature
chore: remove unused fmt_bytes function and related tests
chore: clean up help module by removing unused macros
chore: remove format module from utils
This commit is contained in:
Tunglies
2025-12-26 22:15:09 +08:00
parent 9c6f5bc991
commit bfb18cf003
5 changed files with 4 additions and 47 deletions
+1 -2
View File
@@ -13,7 +13,6 @@ use crate::{
feat,
module::auto_backup::{AutoBackupManager, AutoBackupTrigger},
process::AsyncHandler,
ret_err,
utils::{dirs, help},
};
use clash_verge_draft::SharedDraft;
@@ -455,7 +454,7 @@ pub async fn view_profile(index: String) -> CmdResult {
let path = dirs::app_profiles_dir().stringify_err()?.join(file.as_str());
if !path.exists() {
ret_err!("the file not found");
return CmdResult::Err(format!("file not found \"{}\"", path.display()).into());
}
help::open_file(path).stringify_err()