(pattern: &str, text: &str)
| 2 | use glob::Pattern; |
| 3 | |
| 4 | pub fn matches(pattern: &str, text: &str) -> bool { |
| 5 | Pattern::new(pattern) |
| 6 | .map(|p| p.matches(text)) |
| 7 | .unwrap_or(false) |
| 8 | } |
| 9 | |
| 10 | pub fn matches_any(patterns: &[&str], text: &str) -> bool { |
| 11 | patterns.iter().any(|p| matches(p, text)) |
no test coverage detected