From 279f7ef2aaeed23bc0ac126504ece88e0f063a49 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 24 Apr 2018 15:43:11 +0200 Subject: [PATCH] Fix: Pass output stream to view_entries() --- bin/domain/imag-diary/Cargo.toml | 1 + bin/domain/imag-diary/src/main.rs | 1 + bin/domain/imag-diary/src/view.rs | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/domain/imag-diary/Cargo.toml b/bin/domain/imag-diary/Cargo.toml index 91ae9608..7b8f2cf0 100644 --- a/bin/domain/imag-diary/Cargo.toml +++ b/bin/domain/imag-diary/Cargo.toml @@ -33,6 +33,7 @@ libimagstore = { version = "0.8.0", path = "../../../lib/core/libimagstore libimagrt = { version = "0.8.0", path = "../../../lib/core/libimagrt" } libimagdiary = { version = "0.8.0", path = "../../../lib/domain/libimagdiary" } libimagentryedit = { version = "0.8.0", path = "../../../lib/entry/libimagentryedit" } +libimagentryview = { version = "0.8.0", path = "../../../lib/entry/libimagentryview" } libimaginteraction = { version = "0.8.0", path = "../../../lib/etc/libimaginteraction" } libimagutil = { version = "0.8.0", path = "../../../lib/etc/libimagutil" } libimagtimeui = { version = "0.8.0", path = "../../../lib/etc/libimagtimeui" } diff --git a/bin/domain/imag-diary/src/main.rs b/bin/domain/imag-diary/src/main.rs index 6fa7fb62..ebf343d9 100644 --- a/bin/domain/imag-diary/src/main.rs +++ b/bin/domain/imag-diary/src/main.rs @@ -41,6 +41,7 @@ extern crate itertools; extern crate libimagdiary; extern crate libimagentryedit; +extern crate libimagentryview; extern crate libimagerror; extern crate libimaginteraction; #[macro_use] extern crate libimagrt; diff --git a/bin/domain/imag-diary/src/view.rs b/bin/domain/imag-diary/src/view.rs index 66a952c0..7e48fd90 100644 --- a/bin/domain/imag-diary/src/view.rs +++ b/bin/domain/imag-diary/src/view.rs @@ -23,6 +23,7 @@ use libimagrt::runtime::Runtime; use libimagerror::trace::MapErrTrace; use libimagutil::warn_exit::warn_exit; use libimagstore::iter::get::StoreIdGetIteratorExtension; +use libimagentryview::viewer::Viewer; use util::get_diary_name; @@ -39,7 +40,8 @@ pub fn view(rt: &Runtime) { ::std::process::exit(1) })); - DV::new(hdr).view_entries(entries) + let out = rt.stdout(); + DV::new(hdr).view_entries(entries, &mut out.lock()) .map_err_trace_exit_unwrap(1); }