diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-04-21 15:08:00 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-04-21 15:08:00 +0200 |
commit | 0c4edf64742f7885bdee4ae0442cd2c228f06e9d (patch) | |
tree | 3125e71da2ce9c9eaba4ed0f19a2788b0c84be96 /imag-store | |
parent | 4d27958699cdece238b838700c2324325007c557 (diff) | |
parent | 523eef009d827bf0d6fbb163ece679ac4d780b04 (diff) |
Merge pull request #374 from matthiasbeyer/remove-unneeded-derefs
Remove unneeded derefs
Diffstat (limited to 'imag-store')
-rw-r--r-- | imag-store/src/retrieve.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/imag-store/src/retrieve.rs b/imag-store/src/retrieve.rs index 0a49b164..f5225a46 100644 --- a/imag-store/src/retrieve.rs +++ b/imag-store/src/retrieve.rs @@ -39,7 +39,7 @@ pub fn retrieve(rt: &Runtime) { fn print_entry(rt: &Runtime, scmd: &ArgMatches, e: FileLockEntry) { if do_print_raw(scmd) { debug!("Printing raw content..."); - println!("{}", e.deref().to_str()); + println!("{}", e.to_str()); } else if do_filter(scmd) { debug!("Filtering..."); warn!("Filtering via header specs is currently now supported."); @@ -47,7 +47,6 @@ fn print_entry(rt: &Runtime, scmd: &ArgMatches, e: FileLockEntry) { unimplemented!() } else { debug!("Printing structured..."); - let entry = e.deref(); if do_print_header(scmd) { debug!("Printing header..."); if do_print_header_as_json(rt.cli()) { @@ -58,13 +57,13 @@ 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().clone().into())) + println!("{}", Value::Table(e.get_header().clone().into())) } } if do_print_content(scmd) { debug!("Printing content..."); - println!("{}", entry.get_content()); + println!("{}", e.get_content()); } } |