Whether a single (flat) hook entry's command field contains `prefix`.
(entry: &Value, prefix: &str)
| 258 | |
| 259 | /// Whether a single (flat) hook entry's command field contains `prefix`. |
| 260 | fn entry_command_contains(entry: &Value, prefix: &str) -> bool { |
| 261 | COMMAND_KEYS.iter().any(|key| { |
| 262 | entry |
| 263 | .get(key) |
| 264 | .and_then(Value::as_str) |
| 265 | .is_some_and(|cmd| cmd.contains(prefix)) |
| 266 | }) |
| 267 | } |
| 268 | |
| 269 | /// Whether a single (flat) hook entry carries any command field. |
| 270 | fn entry_has_command(entry: &Value) -> bool { |
no test coverage detected