(
matchers: &[ClaudeHookMatcher],
matcher_name: &str,
command: &str,
)
| 153 | } |
| 154 | |
| 155 | pub(crate) fn hook_command_exists( |
| 156 | matchers: &[ClaudeHookMatcher], |
| 157 | matcher_name: &str, |
| 158 | command: &str, |
| 159 | ) -> bool { |
| 160 | matchers.iter().any(|matcher| { |
| 161 | matcher.matcher == matcher_name && matcher.hooks.iter().any(|h| h.command == command) |
| 162 | }) |
| 163 | } |
| 164 | |
| 165 | pub(crate) fn add_hook_to_matcher( |
| 166 | matchers: &mut Vec<ClaudeHookMatcher>, |
no test coverage detected