Ignore duplicated keys
This commit is contained in:
parent
18e13c999b
commit
89d8abefe7
3 changed files with 5 additions and 1 deletions
|
@ -24,6 +24,7 @@ toml = "^0.4"
|
||||||
version = "2.0.1"
|
version = "2.0.1"
|
||||||
crossbeam = "0.2.*"
|
crossbeam = "0.2.*"
|
||||||
walkdir = "1.0.*"
|
walkdir = "1.0.*"
|
||||||
|
itertools = "0.6.*"
|
||||||
|
|
||||||
[dependencies.libimagerror]
|
[dependencies.libimagerror]
|
||||||
path = "../libimagerror"
|
path = "../libimagerror"
|
||||||
|
|
|
@ -329,6 +329,7 @@ impl AspectConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_aspect_names_for_aspect_position(config_name: &'static str, value: &Option<Value>) -> Vec<String> {
|
fn get_aspect_names_for_aspect_position(config_name: &'static str, value: &Option<Value>) -> Vec<String> {
|
||||||
|
use itertools::Itertools;
|
||||||
let mut v = vec![];
|
let mut v = vec![];
|
||||||
|
|
||||||
match *value {
|
match *value {
|
||||||
|
@ -348,7 +349,8 @@ fn get_aspect_names_for_aspect_position(config_name: &'static str, value: &Optio
|
||||||
None => warn!("No store configuration, cannot get '{}'", config_name),
|
None => warn!("No store configuration, cannot get '{}'", config_name),
|
||||||
_ => warn!("Configuration is not a table"),
|
_ => warn!("Configuration is not a table"),
|
||||||
}
|
}
|
||||||
v
|
|
||||||
|
v.into_iter().unique().collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|
|
@ -42,6 +42,7 @@ extern crate toml;
|
||||||
extern crate semver;
|
extern crate semver;
|
||||||
extern crate crossbeam;
|
extern crate crossbeam;
|
||||||
extern crate walkdir;
|
extern crate walkdir;
|
||||||
|
extern crate itertools;
|
||||||
|
|
||||||
#[macro_use] extern crate libimagerror;
|
#[macro_use] extern crate libimagerror;
|
||||||
#[macro_use] extern crate libimagutil;
|
#[macro_use] extern crate libimagutil;
|
||||||
|
|
Loading…
Reference in a new issue