Make code more readable
This commit is contained in:
parent
22e90479d8
commit
3ad5d0de21
1 changed files with 4 additions and 8 deletions
12
src/main.rs
12
src/main.rs
|
|
@ -391,18 +391,14 @@ fn collect_files(
|
||||||
in_out_pairs
|
in_out_pairs
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(windows)]
|
||||||
fn apply_glob_pattern(path: PathBuf) -> Vec<PathBuf> {
|
fn apply_glob_pattern(path: PathBuf) -> Vec<PathBuf> {
|
||||||
let mut paths = vec![];
|
|
||||||
let input_path = path.to_str().unwrap();
|
let input_path = path.to_str().unwrap();
|
||||||
|
|
||||||
glob::glob(input_path)
|
glob::glob(input_path)
|
||||||
.expect("Failed to read glob pattern")
|
.expect("Failed to read glob pattern")
|
||||||
.for_each(|path| {
|
.map(|path| path.unwrap())
|
||||||
let path = path.unwrap();
|
.collect()
|
||||||
paths.push(path)
|
|
||||||
});
|
|
||||||
|
|
||||||
paths
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse_opts_into_struct(
|
fn parse_opts_into_struct(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue