Fix indention

It seems Leon messed up here... :-)

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2019-10-26 15:26:51 +02:00
parent 7a06544654
commit 447a73f438

View file

@ -59,47 +59,47 @@ mod ui;
pub enum ImagCreate {} pub enum ImagCreate {}
impl ImagApplication for ImagCreate { impl ImagApplication for ImagCreate {
fn run(rt: Runtime) -> Result<()> { fn run(rt: Runtime) -> Result<()> {
let force = rt.cli().is_present("force"); let force = rt.cli().is_present("force");
debug!("Detected force = {}", force); debug!("Detected force = {}", force);
let ids = rt.ids::<crate::ui::PathProvider>() let ids = rt.ids::<crate::ui::PathProvider>()
.map_err_trace_exit_unwrap() .map_err_trace_exit_unwrap()
.unwrap_or_else(|| { .unwrap_or_else(|| {
error!("No ids supplied"); error!("No ids supplied");
::std::process::exit(1); ::std::process::exit(1);
}) })
.into_iter() .into_iter()
.map(|id| { debug!("id = {}", id); id }) .map(|id| { debug!("id = {}", id); id })
.map(Ok); .map(Ok);
if force { if force {
ids.into_retrieve_iter(rt.store()).collect::<Result<Vec<_>>>() ids.into_retrieve_iter(rt.store()).collect::<Result<Vec<_>>>()
} else { } else {
ids.into_create_iter(rt.store()).collect::<Result<Vec<_>>>() ids.into_create_iter(rt.store()).collect::<Result<Vec<_>>>()
}.map_err_trace_exit_unwrap() }.map_err_trace_exit_unwrap()
.into_iter() .into_iter()
.for_each(|el| { .for_each(|el| {
rt.report_touched(el.get_location()).unwrap_or_exit(); rt.report_touched(el.get_location()).unwrap_or_exit();
trace!("Entry = {}", el.get_location()); trace!("Entry = {}", el.get_location());
}); });
Ok(()) Ok(())
} }
fn build_cli<'a>(app: App<'a, 'a>) -> App<'a, 'a> { fn build_cli<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
ui::build_ui(app) ui::build_ui(app)
} }
fn name() -> &'static str { fn name() -> &'static str {
env!("CARGO_PKG_NAME") env!("CARGO_PKG_NAME")
} }
fn description() -> &'static str { fn description() -> &'static str {
"Plumbing tool to create entries" "Plumbing tool to create entries"
} }
fn version() -> &'static str { fn version() -> &'static str {
env!("CARGO_PKG_VERSION") env!("CARGO_PKG_VERSION")
} }
} }