diff --git a/libimagrt/Cargo.toml b/libimagrt/Cargo.toml index a812e697..870b0410 100644 --- a/libimagrt/Cargo.toml +++ b/libimagrt/Cargo.toml @@ -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" diff --git a/libimagrt/src/configuration.rs b/libimagrt/src/configuration.rs index 96d32010..38de0789 100644 --- a/libimagrt/src/configuration.rs +++ b/libimagrt/src/configuration.rs @@ -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, } } diff --git a/libimagrt/src/lib.rs b/libimagrt/src/lib.rs index 1670418f..63a49c45 100644 --- a/libimagrt/src/lib.rs +++ b/libimagrt/src/lib.rs @@ -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;