summaryrefslogtreecommitdiffstats
path: root/libimagutil
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2016-05-15 13:58:57 +0200
committerMatthias Beyer <mail@beyermatthias.de>2016-05-15 13:58:57 +0200
commit11021906b3bdc194203eeb622762f959bbd573d4 (patch)
tree2edc7d205e3a97e4b9f01238cd8328aff18447ef /libimagutil
parent2a468be7abf6958f2f0fa519e2b3a9ff528b1a35 (diff)
parente66d837642691de7be729b9128d73f7d73ddf3c4 (diff)
Merge pull request #401 from matthiasbeyer/libimagutil/code-cleanup
Code cleanup in libimagutil
Diffstat (limited to 'libimagutil')
-rw-r--r--libimagutil/src/key_value_split.rs12
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)))))
}
}