From eceae358f8cce1b7f570641ce8b3d1b6df28e9b4 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Wed, 10 Oct 2018 23:17:21 +0200 Subject: [PATCH] Add ID reporting in imag-notes --- bin/domain/imag-notes/src/main.rs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/bin/domain/imag-notes/src/main.rs b/bin/domain/imag-notes/src/main.rs index 188fe9a3..c7b11300 100644 --- a/bin/domain/imag-notes/src/main.rs +++ b/bin/domain/imag-notes/src/main.rs @@ -109,6 +109,10 @@ fn create(rt: &Runtime) { .map_warn_err_str("Editing failed") .map_err_trace_exit_unwrap(1); } + + let _ = rt + .report_touched(note.get_location()) + .map_err_trace_exit_unwrap(1); } fn delete(rt: &Runtime) { @@ -129,6 +133,10 @@ fn edit(rt: &Runtime) { .edit_content(rt) .map_warn_err_str("Editing failed") .map_err_trace_exit_unwrap(1); + + let _ = rt + .report_touched(note.get_location()) + .map_err_trace_exit_unwrap(1); }) .unwrap_or_else(|| { error!("Cannot find note with name '{}'", name); @@ -156,9 +164,13 @@ fn list(rt: &Runtime) { .iter() .for_each(|note| { let name = note.get_name().map_err_trace_exit_unwrap(1); - writeln!(rt.stdout(), "{}", name) + let _ = writeln!(rt.stdout(), "{}", name) .to_exit_code() - .unwrap_or_exit() + .unwrap_or_exit(); + + let _ = rt + .report_touched(note.get_location()) + .map_err_trace_exit_unwrap(1); }); }