Merge pull request #1491 from matthiasbeyer/fix-rustc126-flatten-warning
Fix: Explicitely use Itertools::flatten()
This commit is contained in:
commit
c8da09f687
1 changed files with 4 additions and 3 deletions
|
@ -54,7 +54,7 @@ pub fn fetch_config(searchpath: &PathBuf) -> Result<Value> {
|
|||
base
|
||||
};
|
||||
|
||||
vec![
|
||||
let vals = vec![
|
||||
vec![searchpath.clone()],
|
||||
gen_vars(searchpath, variants.clone(), &modifier),
|
||||
|
||||
|
@ -63,8 +63,9 @@ pub fn fetch_config(searchpath: &PathBuf) -> Result<Value> {
|
|||
|
||||
xdg_basedir::get_data_home().map(|data_dir| gen_vars(&data_dir, variants.clone(), &modifier))
|
||||
.unwrap_or(vec![]),
|
||||
].iter()
|
||||
.flatten()
|
||||
];
|
||||
|
||||
Itertools::flatten(vals.iter())
|
||||
.filter(|path| path.exists() && path.is_file())
|
||||
.filter_map(|path| {
|
||||
let content = {
|
||||
|
|
Loading…
Reference in a new issue