mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-06-29 09:55:56 +08:00
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:
@@ -19,7 +19,6 @@ struct DisabledState {
|
||||
}
|
||||
|
||||
/// 保存禁用路径列表(即时持久化,不依赖注册表保存按钮)
|
||||
|
||||
pub fn save_disabled_state(system: Vec<String>, user: Vec<String>) -> Result<(), String> {
|
||||
let state = DisabledState { system, user };
|
||||
let path = disabled_file_path();
|
||||
@@ -40,7 +39,6 @@ pub fn save_disabled_state(system: Vec<String>, user: Vec<String>) -> Result<(),
|
||||
}
|
||||
|
||||
/// 加载禁用路径列表,返回 (system_disabled, user_disabled)
|
||||
|
||||
pub fn load_disabled_state() -> Result<(Vec<String>, Vec<String>), String> {
|
||||
let path = disabled_file_path();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user