Fix: build_toml_header() should get the header object as mutable

This commit is contained in:
Matthias Beyer 2016-01-29 20:13:44 +01:00
parent caee76650d
commit 1517d6f310
1 changed files with 2 additions and 2 deletions

View File

@ -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);