summaryrefslogtreecommitdiff
path: root/bin/core/imag-store
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-03-23 15:39:52 +0100
committerMatthias Beyer <mail@beyermatthias.de>2018-03-26 14:24:42 +0200
commite61ccc95617301f9e965ddcff4a434c9af8d7eca (patch)
treeff41fe6156bdb8fb1916df6417ff54c8f67abda4 /bin/core/imag-store
parentec2f87afaded5f05ba57e450df626eb8b6541765 (diff)
downloadimag-e61ccc95617301f9e965ddcff4a434c9af8d7eca.zip
imag-e61ccc95617301f9e965ddcff4a434c9af8d7eca.tar.gz
Fix: Entry::to_str() should return Result<_>
Because serializing might fail. Also fixes all usages of the API.
Diffstat (limited to 'bin/core/imag-store')
-rw-r--r--bin/core/imag-store/src/retrieve.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/core/imag-store/src/retrieve.rs b/bin/core/imag-store/src/retrieve.rs
index ea89513..68ef549 100644
--- a/bin/core/imag-store/src/retrieve.rs
+++ b/bin/core/imag-store/src/retrieve.rs
@@ -53,7 +53,7 @@ pub fn retrieve(rt: &Runtime) {
pub fn print_entry(rt: &Runtime, scmd: &ArgMatches, e: FileLockEntry) {
if do_print_raw(scmd) {
debug!("Printing raw content...");
- let _ = writeln!(rt.stdout(), "{}", e.to_str())
+ let _ = writeln!(rt.stdout(), "{}", e.to_str().map_err_trace_exit_unwrap(1))
.to_exit_code()
.unwrap_or_exit();
} else if do_filter(scmd) {