(patterns: Vec<String>)
| 286 | |
| 287 | impl ImportIgnoreMatcher { |
| 288 | fn new(patterns: Vec<String>) -> Self { |
| 289 | let patterns = patterns |
| 290 | .into_iter() |
| 291 | .map(|pattern| pattern.trim().replace('\\', "/")) |
| 292 | .filter(|pattern| !pattern.is_empty() && !pattern.starts_with('#')) |
| 293 | .collect(); |
| 294 | Self { patterns } |
| 295 | } |
| 296 | |
| 297 | fn is_empty(&self) -> bool { |
| 298 | self.patterns.is_empty() |