summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflip1995 <hello@philkrones.com>2019-08-27 10:43:49 +0200
committerMatthias Beyer <mail@beyermatthias.de>2019-08-28 18:18:40 +0200
commite0e4d4e72084e33964a46fd10c8fc8acdd6091a1 (patch)
tree0497ff6a0f628fb97cf5bc52e8162302b65a9539
parent419a5ffa77f1a887550dcf645c1415eaebb02909 (diff)
[Auto] bin/core/notes: Fix Clippy warnings
Signed-off-by: flip1995 <hello@philkrones.com> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--bin/domain/imag-notes/src/main.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/bin/domain/imag-notes/src/main.rs b/bin/domain/imag-notes/src/main.rs
index 01901fca..8b0ee9af 100644
--- a/bin/domain/imag-notes/src/main.rs
+++ b/bin/domain/imag-notes/src/main.rs
@@ -106,17 +106,17 @@ fn create(rt: &Runtime) {
.map_err_trace_exit_unwrap();
if rt.cli().subcommand_matches("create").unwrap().is_present("edit") {
- let _ = note
+ note
.edit_content(rt)
.map_warn_err_str("Editing failed")
.map_err_trace_exit_unwrap();
}
- let _ = rt.report_touched(note.get_location()).unwrap_or_exit();
+ rt.report_touched(note.get_location()).unwrap_or_exit();
}
fn delete(rt: &Runtime) {
- let _ = rt.store()
+ rt.store()
.delete_note(name_from_cli(rt, "delete"))
.map_info_str("Ok")
.map_err_trace_exit_unwrap();
@@ -124,17 +124,17 @@ fn delete(rt: &Runtime) {
fn edit(rt: &Runtime) {
let name = name_from_cli(rt, "edit");
- let _ = rt
+ rt
.store()
.get_note(name.clone())
.map_err_trace_exit_unwrap()
.map(|mut note| {
- let _ = note
+ note
.edit_content(rt)
.map_warn_err_str("Editing failed")
.map_err_trace_exit_unwrap();
- let _ = rt.report_touched(note.get_location()).unwrap_or_exit();
+ rt.report_touched(note.get_location()).unwrap_or_exit();
})
.unwrap_or_else(|| {
error!("Cannot find note with name '{}'", name);
@@ -144,7 +144,7 @@ fn edit(rt: &Runtime) {
fn list(rt: &Runtime) {
use std::cmp::Ordering;
- let _ = rt
+ rt
.store()
.all_notes()
.map_err_trace_exit_unwrap()
@@ -155,17 +155,17 @@ fn list(rt: &Runtime) {
exit(1)
}))
.sorted_by(|note_a, note_b| if let (Ok(a), Ok(b)) = (note_a.get_name(), note_b.get_name()) {
- return a.cmp(&b)
+ a.cmp(&b)
} else {
- return Ordering::Greater;
+ Ordering::Greater
})
.for_each(|note| {
let name = note.get_name().map_err_trace_exit_unwrap();
- let _ = writeln!(rt.stdout(), "{}", name)
+ writeln!(rt.stdout(), "{}", name)
.to_exit_code()
.unwrap_or_exit();
- let _ = rt.report_touched(note.get_location()).unwrap_or_exit();
+ rt.report_touched(note.get_location()).unwrap_or_exit();
});
}