diff options
author | flip1995 <hello@philkrones.com> | 2019-08-27 10:42:37 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2019-08-28 18:18:40 +0200 |
commit | 3963e5ec2d3e0e8a30fdb542b0529cd92acefda3 (patch) | |
tree | 650ab4e33c3841cfeda02ebc7c4ea88164bbedfd | |
parent | 3a32be23c556c3863a48ba5547da797023a0c405 (diff) |
[Auto] bin/core/bookmark: Fix Clippy warnings
Signed-off-by: flip1995 <hello@philkrones.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r-- | bin/domain/imag-bookmark/src/main.rs | 15 |
1 files 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"); |