diff --git a/libimagutil/src/key_value_split.rs b/libimagutil/src/key_value_split.rs index b5e2790e..f1a7a7c7 100644 --- a/libimagutil/src/key_value_split.rs +++ b/libimagutil/src/key_value_split.rs @@ -56,18 +56,10 @@ impl IntoKeyValue for String { .unwrap(); } R.captures(&self[..]) - .map(|caps| { - caps.name("VALUE") - .or(caps.name("QVALUE")) - .unwrap_or("") - }) + .map(|caps| caps.name("VALUE").or(caps.name("QVALUE")).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), String::from(v))))) } }