Remove EntryHeader::toml() calls and replace with ::into() and ::from() calls
This commit is contained in:
parent
9951422dc4
commit
37ce23fcaa
2 changed files with 8 additions and 4 deletions
|
@ -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()))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue