diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-05-23 21:42:49 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-05-23 21:43:20 +0200 |
commit | 394b90f03881b48f8247654c6929a2de4c927e58 (patch) | |
tree | 6093c0002048ce0dd7ee68586b1474de2d30e18d /libimagentrylink | |
parent | 0e03998499e63dd5a117c4c0c1515d2f39cce26d (diff) |
libimagentrylink: Refactor code with is_match!() macro
Diffstat (limited to 'libimagentrylink')
-rw-r--r-- | libimagentrylink/src/internal.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libimagentrylink/src/internal.rs b/libimagentrylink/src/internal.rs index 16186ddb..0c6b977b 100644 --- a/libimagentrylink/src/internal.rs +++ b/libimagentrylink/src/internal.rs @@ -160,7 +160,7 @@ fn process_rw_result(links: StoreResult<Option<Value>>) -> Result<Vec<Link>> { } }; - if !links.iter().all(|l| match *l { Value::String(_) => true, _ => false }) { + if !links.iter().all(|l| is_match!(*l, Value::String(_))) { debug!("At least one of the Values which were expected in the Array of links is a non-String!"); debug!("Generating LinkError"); return Err(LinkError::new(LinkErrorKind::ExistingLinkTypeWrong, None)); |