(patterns: Vec<String>)
| 294 | |
| 295 | impl ImportIgnoreMatcher { |
| 296 | fn new(patterns: Vec<String>) -> Self { |
| 297 | let patterns = patterns |
| 298 | .into_iter() |
| 299 | .map(|pattern| pattern.trim().replace('\\', "/")) |
| 300 | .filter(|pattern| !pattern.is_empty() && !pattern.starts_with('#')) |
| 301 | .collect(); |
| 302 | Self { patterns } |
| 303 | } |
| 304 | |
| 305 | fn is_empty(&self) -> bool { |
| 306 | self.patterns.is_empty() |