summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Unterwaditzer <markus@unterwaditzer.net>2015-01-16 16:45:21 +0100
committerMarkus Unterwaditzer <markus@unterwaditzer.net>2015-01-16 16:45:21 +0100
commit036d85e5e2a8f85442fedd38b9bc4eaba16e9fae (patch)
treed110a07298304f66fac02f4523afe41bf42e7f20
parentab4f56459f92b619f2d43defbb3a2ebf33f54b8c (diff)
Simplify prop param insertion
-rw-r--r--src/vobject/lib.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/vobject/lib.rs b/src/vobject/lib.rs
index 242bc93..bca0888 100644
--- a/src/vobject/lib.rs
+++ b/src/vobject/lib.rs
@@ -148,9 +148,7 @@ name -> &'input str
params -> HashMap<String, String>
= ps:(";" p:param {p})* {
let mut rv: HashMap<String, String> = HashMap::with_capacity(ps.len());
- for (k, v) in ps.into_iter() {
- rv.insert(k.to_string(), v.to_string());
- };
+ rv.extend(ps.into_iter().map(|(k, v)| (k.to_string(), v.to_string())));
rv
}