migrate detect sources to sources
This commit is contained in:
parent
4c17f99cf7
commit
d7f158a4bd
1 changed files with 14 additions and 13 deletions
|
|
@ -1,6 +1,5 @@
|
|||
#[cfg(test)]
|
||||
mod scanner {
|
||||
use scanner::detect_sources::DetectSources;
|
||||
use std::process::Command;
|
||||
use std::{fs, path};
|
||||
|
||||
|
|
@ -35,18 +34,20 @@ mod scanner {
|
|||
let base = format!("{}", dir.display());
|
||||
|
||||
// Resolve all content paths for the (temporary) current working directory
|
||||
let mut scanner = Scanner::new(
|
||||
Some(DetectSources::new(base.clone().into())),
|
||||
Some(
|
||||
globs
|
||||
.iter()
|
||||
.map(|x| GlobEntry {
|
||||
base: base.clone(),
|
||||
pattern: x.to_string(),
|
||||
})
|
||||
.collect(),
|
||||
),
|
||||
);
|
||||
let mut sources: Vec<GlobEntry> = globs
|
||||
.iter()
|
||||
.map(|x| GlobEntry {
|
||||
base: base.clone(),
|
||||
pattern: x.to_string(),
|
||||
})
|
||||
.collect();
|
||||
|
||||
sources.push(GlobEntry {
|
||||
base: base.clone(),
|
||||
pattern: "**/*".to_string(),
|
||||
});
|
||||
|
||||
let mut scanner = Scanner::new(Some(sources));
|
||||
|
||||
let candidates = scanner.scan();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue