Minify mapping with dependency: is-match = 0.1

This commit is contained in:
Matthias Beyer 2017-06-03 14:50:18 +02:00
parent e35d78fedb
commit fe7bde3882
3 changed files with 3 additions and 1 deletions

View file

@ -22,6 +22,7 @@ xdg-basedir = "1.0"
itertools = "0.5"
tempfile = "2.1"
ansi_term = "0.9"
is-match = "0.1"
[dependencies.libimagstore]
path = "../libimagstore"

View file

@ -190,7 +190,7 @@ impl Deref for Configuration {
fn get_verbosity(v: &Value) -> bool {
match *v {
Value::Table(ref t) => t.get("verbose")
.map_or(false, |v| match *v { Value::Boolean(b) => b, _ => false, }),
.map_or(false, |v| is_match!(v, &Value::Boolean(true))),
_ => false,
}
}

View file

@ -42,6 +42,7 @@ extern crate ansi_term;
extern crate clap;
extern crate toml;
#[macro_use] extern crate is_match;
extern crate libimagstore;
extern crate libimagutil;