Skip to content

Commit 5747d1c

Browse files
committed
migrate detect sources to sources
1 parent 86e9e4d commit 5747d1c

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

crates/oxide/tests/scanner.rs

+14-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#[cfg(test)]
22
mod scanner {
3-
use scanner::detect_sources::DetectSources;
43
use std::process::Command;
54
use std::{fs, path};
65

@@ -35,18 +34,20 @@ mod scanner {
3534
let base = format!("{}", dir.display());
3635

3736
// Resolve all content paths for the (temporary) current working directory
38-
let mut scanner = Scanner::new(
39-
Some(DetectSources::new(base.clone().into())),
40-
Some(
41-
globs
42-
.iter()
43-
.map(|x| GlobEntry {
44-
base: base.clone(),
45-
pattern: x.to_string(),
46-
})
47-
.collect(),
48-
),
49-
);
37+
let mut sources: Vec<GlobEntry> = globs
38+
.iter()
39+
.map(|x| GlobEntry {
40+
base: base.clone(),
41+
pattern: x.to_string(),
42+
})
43+
.collect();
44+
45+
sources.push(GlobEntry {
46+
base: base.clone(),
47+
pattern: "**/*".to_string(),
48+
});
49+
50+
let mut scanner = Scanner::new(Some(sources));
5051

5152
let candidates = scanner.scan();
5253

0 commit comments

Comments
 (0)