(group: &Value, command: &str)
| 510 | } |
| 511 | |
| 512 | fn group_has_command(group: &Value, command: &str) -> bool { |
| 513 | group |
| 514 | .get("hooks") |
| 515 | .and_then(Value::as_array) |
| 516 | .is_some_and(|hooks| { |
| 517 | hooks.iter().any(|hook| { |
| 518 | hook.get("command") |
| 519 | .and_then(Value::as_str) |
| 520 | .is_some_and(|cmd| cmd == command) |
| 521 | }) |
| 522 | }) |
| 523 | } |
| 524 | |
| 525 | fn group_has_hook_spec( |
| 526 | group: &Value, |
no test coverage detected