|
1 | 1 | pub mod auto_source_detection;
|
2 |
| -pub mod detect_sources; |
3 | 2 | pub mod sources;
|
4 | 3 |
|
5 | 4 | use crate::extractor::{Extracted, Extractor};
|
6 |
| -use crate::glob::optimize_patterns; |
7 |
| -use crate::scanner::detect_sources::resolve_globs; |
8 | 5 | use crate::scanner::sources::{
|
9 | 6 | public_source_entries_to_private_source_entries, PublicSourceEntry, SourceEntry, Sources,
|
10 | 7 | };
|
@@ -92,9 +89,6 @@ pub struct Scanner {
|
92 | 89 | /// All directories, sub-directories, etc… we saw during source detection
|
93 | 90 | dirs: Vec<PathBuf>,
|
94 | 91 |
|
95 |
| - /// All generated globs, used for setting up watchers |
96 |
| - globs: Vec<GlobEntry>, |
97 |
| - |
98 | 92 | /// Track unique set of candidates
|
99 | 93 | candidates: FxHashSet<String>,
|
100 | 94 | }
|
@@ -294,32 +288,6 @@ impl Scanner {
|
294 | 288 | .collect()
|
295 | 289 | }
|
296 | 290 |
|
297 |
| - #[tracing::instrument(skip_all)] |
298 |
| - pub fn get_globs(&mut self) -> Vec<GlobEntry> { |
299 |
| - self.scan_sources(); |
300 |
| - |
301 |
| - for source in self.sources.iter() { |
302 |
| - match source { |
303 |
| - SourceEntry::Auto { base } | SourceEntry::External { base } => { |
304 |
| - let globs = resolve_globs((base).to_path_buf(), &self.dirs, &self.extensions); |
305 |
| - self.globs.extend(globs); |
306 |
| - } |
307 |
| - SourceEntry::Pattern { base, pattern } => { |
308 |
| - self.globs.push(GlobEntry { |
309 |
| - base: base.to_string_lossy().to_string(), |
310 |
| - pattern: pattern.to_string(), |
311 |
| - }); |
312 |
| - } |
313 |
| - _ => {} |
314 |
| - } |
315 |
| - } |
316 |
| - |
317 |
| - // Re-optimize the globs to reduce the number of patterns we have to scan. |
318 |
| - self.globs = optimize_patterns(&self.globs); |
319 |
| - |
320 |
| - self.globs.clone() |
321 |
| - } |
322 |
| - |
323 | 291 | #[tracing::instrument(skip_all)]
|
324 | 292 | pub fn get_normalized_sources(&mut self) -> Vec<GlobEntry> {
|
325 | 293 | self.sources
|
|
0 commit comments