Add id reporting in imag-create

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2019-10-26 20:30:38 +02:00
parent a6effe7ef3
commit cbbbbb59b5

View file

@ -47,6 +47,7 @@ use clap::App;
use libimagrt::runtime::Runtime; use libimagrt::runtime::Runtime;
use libimagrt::application::ImagApplication; use libimagrt::application::ImagApplication;
use libimagrt::iter::ReportTouchedResultEntry;
use libimagstore::iter::create::StoreIdCreateIteratorExtension; use libimagstore::iter::create::StoreIdCreateIteratorExtension;
use libimagstore::iter::retrieve::StoreIdRetrieveIteratorExtension; use libimagstore::iter::retrieve::StoreIdRetrieveIteratorExtension;
@ -65,9 +66,9 @@ impl ImagApplication for ImagCreate {
.map(Ok); .map(Ok);
if force { if force {
ids.into_retrieve_iter(rt.store()).collect::<Result<Vec<_>>>() ids.into_retrieve_iter(rt.store()).map_report_touched(&rt).collect::<Result<Vec<_>>>()
} else { } else {
ids.into_create_iter(rt.store()).collect::<Result<Vec<_>>>() ids.into_create_iter(rt.store()).map_report_touched(&rt).collect::<Result<Vec<_>>>()
}.map(|_| ()) }.map(|_| ())
} }