From e66d837642691de7be729b9128d73f7d73ddf3c4 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 14 May 2016 19:51:24 +0200 Subject: [PATCH] Remove unneeded scopes --- libimagutil/src/key_value_split.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) 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))))) } }