From 394b90f03881b48f8247654c6929a2de4c927e58 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 23 May 2016 21:42:49 +0200 Subject: [PATCH] libimagentrylink: Refactor code with is_match!() macro --- libimagentrylink/src/internal.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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>) -> Result> { } }; - 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));