Skip to content

Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors

Rust

style(cli): collapse the Grok rule cleanup if into a let-chain

Victor Alencardd315a67a149
diff --git a/crates/ai-memory-cli/src/commands/uninstall.rs b/crates/ai-memory-cli/src/commands/uninstall.rs
index a9b4c478..70a0ad3d 100644
--- a/crates/ai-memory-cli/src/commands/uninstall.rs
+++ b/crates/ai-memory-cli/src/commands/uninstall.rs
@@ -641,10 +641,10 @@ fn apply_change(
if *kind == DeleteKind::ManagedSkill {
remove_empty_skill_dirs(path)?;
}
- if *kind == DeleteKind::GrokHandoffRule {
- if let Some(parent) = path.parent() {
- remove_dir_if_empty(parent)?;
- }
+ if *kind == DeleteKind::GrokHandoffRule
+ && let Some(parent) = path.parent()
+ {
+ remove_dir_if_empty(parent)?;
}
}
PlannedChange::Rewrite { path, ops, .. } => {