[Auto] bin/core/diary: Fix Clippy warnings
Signed-off-by: flip1995 <hello@philkrones.com> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
5b4b699875
commit
171757f5ca
4 changed files with 6 additions and 6 deletions
|
@ -46,7 +46,7 @@ pub fn create(rt: &Runtime) {
|
||||||
|
|
||||||
let mut entry = create_entry(rt.store(), &diaryname, rt);
|
let mut entry = create_entry(rt.store(), &diaryname, rt);
|
||||||
|
|
||||||
let _ = rt.report_touched(entry.get_location()).unwrap_or_exit();
|
rt.report_touched(entry.get_location()).unwrap_or_exit();
|
||||||
|
|
||||||
let res = if rt.cli().subcommand_matches("create").unwrap().is_present("no-edit") {
|
let res = if rt.cli().subcommand_matches("create").unwrap().is_present("no-edit") {
|
||||||
debug!("Not editing new diary entry");
|
debug!("Not editing new diary entry");
|
||||||
|
@ -56,7 +56,7 @@ pub fn create(rt: &Runtime) {
|
||||||
entry.edit_content(rt).context(err_msg("Diary edit error")).map_err(Error::from)
|
entry.edit_content(rt).context(err_msg("Diary edit error")).map_err(Error::from)
|
||||||
};
|
};
|
||||||
|
|
||||||
let _ = res.map_err_trace_exit_unwrap();
|
res.map_err_trace_exit_unwrap();
|
||||||
info!("Ok!");
|
info!("Ok!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,9 +67,9 @@ pub fn delete(rt: &Runtime) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let _ = rt.report_touched(&to_del_location).unwrap_or_exit();
|
rt.report_touched(&to_del_location).unwrap_or_exit();
|
||||||
|
|
||||||
let _ = rt
|
rt
|
||||||
.store()
|
.store()
|
||||||
.delete(to_del_location)
|
.delete(to_del_location)
|
||||||
.map_err_trace_exit_unwrap();
|
.map_err_trace_exit_unwrap();
|
||||||
|
|
|
@ -55,7 +55,7 @@ pub fn list(rt: &Runtime) {
|
||||||
.map(IntoStoreId::into_storeid)
|
.map(IntoStoreId::into_storeid)
|
||||||
.trace_unwrap_exit()
|
.trace_unwrap_exit()
|
||||||
.for_each(|id| {
|
.for_each(|id| {
|
||||||
let _ = rt.report_touched(&id).unwrap_or_exit();
|
rt.report_touched(&id).unwrap_or_exit();
|
||||||
|
|
||||||
if !rt.output_is_pipe() {
|
if !rt.output_is_pipe() {
|
||||||
writeln!(rt.stdout(), "{}", id).to_exit_code().unwrap_or_exit()
|
writeln!(rt.stdout(), "{}", id).to_exit_code().unwrap_or_exit()
|
||||||
|
|
|
@ -45,7 +45,7 @@ pub fn view(rt: &Runtime) {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
let entries = entries.map(|e| {
|
let entries = entries.map(|e| {
|
||||||
let _ = rt.report_touched(e.get_location()).unwrap_or_exit();
|
rt.report_touched(e.get_location()).unwrap_or_exit();
|
||||||
|
|
||||||
e
|
e
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue