From b59fcdffcd4e7782d6c7c4ca25daa865dbc6d45f Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 30 Jan 2017 09:42:45 +0100 Subject: [PATCH] Fix backwards-incompatibilities of regex crate --- libimagutil/src/key_value_split.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libimagutil/src/key_value_split.rs b/libimagutil/src/key_value_split.rs index ff2870bf..2d405f3a 100644 --- a/libimagutil/src/key_value_split.rs +++ b/libimagutil/src/key_value_split.rs @@ -75,10 +75,12 @@ impl IntoKeyValue for String { .unwrap(); } R.captures(&self[..]) - .map(|caps| caps.name("VALUE").or(caps.name("QVALUE")).unwrap_or("")) + .map(|c| c.name("VALUE").or(c.name("QVALUE")).map(|m| m.as_str()).unwrap_or("")) }; - key.and_then(|k| value.and_then(|v| Some(KeyValue::new(String::from(k), String::from(v))))) + key.and_then(|k| { + value.and_then(|v| Some(KeyValue::new(String::from(k.as_str()), String::from(v)))) + }) } }