diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-05-14 19:51:24 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-05-14 19:51:24 +0200 |
commit | e66d837642691de7be729b9128d73f7d73ddf3c4 (patch) | |
tree | f846fb7c7b947c517fe315b92313e801f5d9b4fb /libimagutil | |
parent | 0c89fafe209505acd72f787bda16bcdb9a249457 (diff) |
Remove unneeded scopes
Diffstat (limited to 'libimagutil')
-rw-r--r-- | libimagutil/src/key_value_split.rs | 12 |
1 files 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<String, String> 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))))) } } |