From 25e5936b08606d767d0316da8ea534b8b0bcde28 Mon Sep 17 00:00:00 2001 From: flip1995 Date: Tue, 27 Aug 2019 10:39:13 +0200 Subject: [PATCH] [Auto] bin/core/category: Fix Clippy warnings Signed-off-by: flip1995 Signed-off-by: Matthias Beyer --- bin/core/imag-category/src/main.rs | 10 +++++----- bin/core/imag-category/src/ui.rs | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/bin/core/imag-category/src/main.rs b/bin/core/imag-category/src/main.rs index 633729d1..76bc593b 100644 --- a/bin/core/imag-category/src/main.rs +++ b/bin/core/imag-category/src/main.rs @@ -103,7 +103,7 @@ fn set(rt: &Runtime) { }) .into_iter(); - StoreIdIterator::new(Box::new(sids.into_iter().map(Ok))) + StoreIdIterator::new(Box::new(sids.map(Ok))) .into_get_iter(rt.store()) .trace_unwrap_exit() .map(|o| o.unwrap_or_else(|| { @@ -111,7 +111,7 @@ fn set(rt: &Runtime) { ::std::process::exit(1) })) .for_each(|mut entry| { - let _ = entry + entry .set_category_checked(rt.store(), &name) .map_err_trace_exit_unwrap(); }) @@ -129,7 +129,7 @@ fn get(rt: &Runtime) { }) .into_iter(); - StoreIdIterator::new(Box::new(sids.into_iter().map(Ok))) + StoreIdIterator::new(Box::new(sids.map(Ok))) .into_get_iter(rt.store()) .trace_unwrap_exit() .map(|o| o.unwrap_or_else(|| { @@ -138,7 +138,7 @@ fn get(rt: &Runtime) { })) .map(|entry| entry.get_category().map_err_trace_exit_unwrap()) .for_each(|name| { - let _ = writeln!(outlock, "{}", name).to_exit_code().unwrap_or_exit(); + writeln!(outlock, "{}", name).to_exit_code().unwrap_or_exit(); }) } @@ -190,7 +190,7 @@ fn delete_category(rt: &Runtime) { if answer { info!("Deleting category '{}'", name); - let _ = rt + rt .store() .delete_category(&name) .map_err_trace_exit_unwrap(); diff --git a/bin/core/imag-category/src/ui.rs b/bin/core/imag-category/src/ui.rs index f25aeca0..bea6bd82 100644 --- a/bin/core/imag-category/src/ui.rs +++ b/bin/core/imag-category/src/ui.rs @@ -111,7 +111,6 @@ impl IdPathProvider for PathProvider { fn get_id_paths(field: &str, subm: &ArgMatches) -> Result>> { subm.values_of(field) .map(|v| v - .into_iter() .map(PathBuf::from) .map(|pb| pb.into_storeid()) .collect::>>()