summaryrefslogtreecommitdiffstats
path: root/imag-store
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2016-01-29 20:13:44 +0100
committerMatthias Beyer <mail@beyermatthias.de>2016-02-09 13:45:13 +0100
commit1517d6f3109162ae179cd68ed613218bf92bb9b3 (patch)
treeb52a8d3ceac9eb6219b4a755e1e8e55b50e5aaf3 /imag-store
parentcaee76650d1b3b99a4ce36a3bfaf6f829e57b13f (diff)
Fix: build_toml_header() should get the header object as mutable
Diffstat (limited to 'imag-store')
-rw-r--r--imag-store/src/util.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/imag-store/src/util.rs b/imag-store/src/util.rs
index a96fc508..58c12533 100644
--- a/imag-store/src/util.rs
+++ b/imag-store/src/util.rs
@@ -22,10 +22,10 @@ pub fn build_entry_path(rt: &Runtime, path_elem: &str) -> PathBuf {
path
}
-pub fn build_toml_header(matches: &ArgMatches, header: EntryHeader) -> EntryHeader {
+pub fn build_toml_header(matches: &ArgMatches, mut header: EntryHeader) -> EntryHeader {
debug!("Building header from cli spec");
if let Some(headerspecs) = matches.values_of("header") {
- let mut main = BTreeMap::new();
+ let mut main = header.toml_mut();
for tpl in headerspecs.into_iter().filter_map(|hs| String::from(hs).into_kv()) {
let (key, value) = tpl.into();
debug!("Splitting: {:?}", key);