fix: 审查修复 — save_profile 保留原始 created、&str 参数、clippy 清理

- CRITICAL: save_profile 覆盖已有配置时保留原始创建时间
- HIGH: profiles.rs 函数参数 String → &str(减少不必要的克隆)
- MEDIUM: 修复 18 个 clippy警告(空行 + map_or + collapsible-if)
- CLI: 移除不必要的 name.clone() 调用

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-28 23:26:54 +08:00
parent 812f39b159
commit 36e1c89b2e
8 changed files with 27 additions and 29 deletions
-1
View File
@@ -12,7 +12,6 @@ fn backup_base_dir() -> PathBuf {
}
/// 获取 APPDATA 路径下的备份目录
pub fn get_appdata_dir() -> String {
backup_base_dir().to_string_lossy().to_string()
}