(patterns: Vec<String>)
| 225 | |
| 226 | impl ImportIgnoreMatcher { |
| 227 | fn new(patterns: Vec<String>) -> Self { |
| 228 | let patterns = patterns |
| 229 | .into_iter() |
| 230 | .map(|pattern| pattern.trim().replace('\\', "/")) |
| 231 | .filter(|pattern| !pattern.is_empty() && !pattern.starts_with('#')) |
| 232 | .collect(); |
| 233 | Self { patterns } |
| 234 | } |
| 235 | |
| 236 | fn is_empty(&self) -> bool { |
| 237 | self.patterns.is_empty() |