From 3963e5ec2d3e0e8a30fdb542b0529cd92acefda3 Mon Sep 17 00:00:00 2001 From: flip1995 Date: Tue, 27 Aug 2019 10:42:37 +0200 Subject: [PATCH] [Auto] bin/core/bookmark: Fix Clippy warnings Signed-off-by: flip1995 Signed-off-by: Matthias Beyer --- bin/domain/imag-bookmark/src/main.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/bin/domain/imag-bookmark/src/main.rs b/bin/domain/imag-bookmark/src/main.rs index 4b8f8516..2f0eb5e0 100644 --- a/bin/domain/imag-bookmark/src/main.rs +++ b/bin/domain/imag-bookmark/src/main.rs @@ -105,13 +105,13 @@ fn add(rt: &Runtime) { .ok_or_else(|| format_err!("No bookmark collection '{}' found", coll)) .map_err_trace_exit_unwrap(); - let _ = rt.report_touched(collection.get_location()).unwrap_or_exit(); + rt.report_touched(collection.get_location()).unwrap_or_exit(); for url in scmd.values_of("urls").unwrap() { // unwrap saved by clap let new_ids = BookmarkCollection::add_link(collection.deref_mut(), rt.store(), BookmarkLink::from(url)) .map_err_trace_exit_unwrap(); - let _ = rt.report_all_touched(new_ids.into_iter()).unwrap_or_exit(); + rt.report_all_touched(new_ids.into_iter()).unwrap_or_exit(); } info!("Ready"); @@ -123,7 +123,7 @@ fn collection(rt: &Runtime) { if scmd.is_present("add") { // adding a new collection let name = scmd.value_of("add").unwrap(); if let Ok(id) = BookmarkCollectionStore::new(rt.store(), &name) { - let _ = rt.report_touched(id.get_location()).unwrap_or_exit(); + rt.report_touched(id.get_location()).unwrap_or_exit(); info!("Created: {}", name); } else { warn!("Creating collection {} failed", name); @@ -135,7 +135,7 @@ fn collection(rt: &Runtime) { let name = scmd.value_of("remove").unwrap(); { // remove all links - let _ = BookmarkCollectionStore::get(rt.store(), &name) + BookmarkCollectionStore::get(rt.store(), &name) .map_err_trace_exit_unwrap() .ok_or_else(|| format_err!("Collection does not exist: {}", name)) .map_err_trace_exit_unwrap() @@ -160,13 +160,12 @@ fn list(rt: &Runtime) { .ok_or_else(|| format_err!("No bookmark collection '{}' found", coll)) .map_err_trace_exit_unwrap(); - let _ = rt.report_touched(collection.get_location()).unwrap_or_exit(); + rt.report_touched(collection.get_location()).unwrap_or_exit(); collection .get_links(rt.store()) .map_dbg_str("Listing...") .map_err_trace_exit_unwrap() - .into_iter() .enumerate() .for_each(|(i, link)| match link { Ok(link) => writeln!(rt.stdout(), "{: >3}: {}", i, link).to_exit_code().unwrap_or_exit(), @@ -184,13 +183,13 @@ fn remove(rt: &Runtime) { .ok_or_else(|| format_err!("No bookmark collection '{}' found", coll)) .map_err_trace_exit_unwrap(); - let _ = rt.report_touched(collection.get_location()).unwrap_or_exit(); + rt.report_touched(collection.get_location()).unwrap_or_exit(); for url in scmd.values_of("urls").unwrap() { // enforced by clap let removed_links = BookmarkCollection::remove_link(collection.deref_mut(), rt.store(), BookmarkLink::from(url)) .map_err_trace_exit_unwrap(); - let _ = rt.report_all_touched(removed_links.into_iter()).unwrap_or_exit(); + rt.report_all_touched(removed_links.into_iter()).unwrap_or_exit(); } info!("Ready");