Skip to content

Commit 2aca015

Browse files
committed
dunce was alraedy handled (?)
1 parent 0ad749c commit 2aca015

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

crates/oxide/tests/scanner.rs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,26 +51,14 @@ mod scanner {
5151

5252
let candidates = scanner.scan();
5353

54-
let mut paths: Vec<_> = scanner
55-
.get_files()
56-
.into_iter()
57-
.map(|x| x.replace(&format!("{}{}", &base, path::MAIN_SEPARATOR), ""))
58-
.collect();
54+
let mut paths: Vec<_> = scanner.get_files();
5955

6056
for glob in scanner.get_globs() {
61-
paths.push(
62-
format!(
63-
"{}{}{}",
64-
dunce::canonicalize(glob.base).unwrap().display(),
65-
"/",
66-
glob.pattern
67-
)
68-
.replace('\\', "/"),
69-
);
57+
paths.push(format!("{}{}{}", glob.base, "/", glob.pattern));
7058
}
7159

7260
let parent_dir =
73-
format!("{}{}", dunce::canonicalize(&base).unwrap().display(), "/",).replace('\\', "/");
61+
format!("{}{}", dunce::canonicalize(&base).unwrap().display(), "/").replace('\\', "/");
7462

7563
paths = paths
7664
.into_iter()

0 commit comments

Comments
 (0)