(patterns: Vec<String>)
| 338 | |
| 339 | impl ImportIgnoreMatcher { |
| 340 | fn new(patterns: Vec<String>) -> Self { |
| 341 | let patterns = patterns |
| 342 | .into_iter() |
| 343 | .map(|pattern| pattern.trim().replace('\\', "/")) |
| 344 | .filter(|pattern| !pattern.is_empty() && !pattern.starts_with('#')) |
| 345 | .collect(); |
| 346 | Self { patterns } |
| 347 | } |
| 348 | |
| 349 | fn is_empty(&self) -> bool { |
| 350 | self.patterns.is_empty() |