Remove all Atomic hooks from a matcher list. Preserves non-Atomic hooks. Removes empty matchers (those with no remaining hooks after Atomic hooks are removed).
(matchers: &mut Vec<GeminiHookMatcher>)
| 788 | /// Preserves non-Atomic hooks. Removes empty matchers (those with no |
| 789 | /// remaining hooks after Atomic hooks are removed). |
| 790 | fn remove_atomic_hooks(matchers: &mut Vec<GeminiHookMatcher>) { |
| 791 | for m in matchers.iter_mut() { |
| 792 | m.hooks.retain(|h| !is_atomic_hook(&h.command)); |
| 793 | } |
| 794 | // Remove empty matchers |
| 795 | matchers.retain(|m| !m.hooks.is_empty()); |
| 796 | } |
| 797 | |
| 798 | // Tests |
| 799 |