diff --git a/imag-store/src/retrieve.rs b/imag-store/src/retrieve.rs index 311f6bd1..2c0d19c5 100644 --- a/imag-store/src/retrieve.rs +++ b/imag-store/src/retrieve.rs @@ -50,7 +50,7 @@ fn print_entry(rt: &Runtime, scmd: &ArgMatches, e: FileLockEntry) { } else { debug!("Printing header as TOML..."); // We have to Value::Table() for Display - println!("{}", Value::Table(entry.get_header().toml().clone())) + println!("{}", Value::Table(entry.get_header().clone().into())) } } diff --git a/imag-store/src/util.rs b/imag-store/src/util.rs index 6ebb3a2d..987ab4f3 100644 --- a/imag-store/src/util.rs +++ b/imag-store/src/util.rs @@ -43,7 +43,7 @@ pub fn build_entry_path(rt: &Runtime, path_elem: &str) -> PathBuf { 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 = header.toml_mut(); + let mut main = header.into(); debug!("headerspec = {:?}", headerspecs); let kvs = headerspecs.into_iter() .filter_map(|hs| { @@ -61,9 +61,13 @@ pub fn build_toml_header(matches: &ArgMatches, mut header: EntryHeader) -> Entry insert_key_into(String::from(current.unwrap()), &mut split, value, &mut main); } } + + debug!("Header = {:?}", main); + EntryHeader::from(main) + } else { + debug!("Header = {:?}", header); + header } - debug!("Header = {:?}", header); - header } fn insert_key_into(current: String,