diff --git a/libimagentrytag/Cargo.toml b/libimagentrytag/Cargo.toml index 2a4e1ed2..64d62192 100644 --- a/libimagentrytag/Cargo.toml +++ b/libimagentrytag/Cargo.toml @@ -16,3 +16,6 @@ path = "../libimagstore" [dependencies.libimagerror] path = "../libimagerror" +[dependencies.libimagutil] +path = "../libimagutil" + diff --git a/libimagentrytag/src/lib.rs b/libimagentrytag/src/lib.rs index 232de3b3..87e4fe87 100644 --- a/libimagentrytag/src/lib.rs +++ b/libimagentrytag/src/lib.rs @@ -20,6 +20,7 @@ extern crate toml; extern crate libimagstore; #[macro_use] extern crate libimagerror; +#[macro_use] extern crate libimagutil; pub mod error; pub mod exec; diff --git a/libimagentrytag/src/tagable.rs b/libimagentrytag/src/tagable.rs index 6206a53e..44143d98 100644 --- a/libimagentrytag/src/tagable.rs +++ b/libimagentrytag/src/tagable.rs @@ -37,7 +37,7 @@ impl Tagable for EntryHeader { match tags { Some(Value::Array(tags)) => { - if !tags.iter().all(|t| match *t { Value::String(_) => true, _ => false }) { + if !tags.iter().all(|t| is_match!(*t, Value::String(_))) { return Err(TagError::new(TagErrorKind::TagTypeError, None)); } if tags.iter().any(|t| match *t { @@ -110,7 +110,7 @@ impl Tagable for EntryHeader { } let tags = tags.unwrap(); - if !tags.iter().all(|t| match *t { Value::String(_) => true, _ => false }) { + if !tags.iter().all(|t| is_match!(*t, Value::String(_))) { return Err(TagError::new(TagErrorKind::TagTypeError, None)); }