Make code more readable

This commit is contained in:
SalOne22 2023-07-11 17:44:43 +02:00
parent 22e90479d8
commit 3ad5d0de21

View file

@ -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(