Replace complex match with if let Err(e)
This commit is contained in:
parent
44675a4b4f
commit
4ddb558837
1 changed files with 4 additions and 3 deletions
|
@ -52,9 +52,10 @@ pub fn delete(rt: &Runtime) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
match diary.delete_entry(to_del) {
|
if let Err(e) = diary.delete_entry(to_del) {
|
||||||
Ok(_) => info!("Ok"),
|
trace_error_exit(&e, 1)
|
||||||
Err(e) => trace_error_exit(&e, 1),
|
}
|
||||||
}
|
|
||||||
|
info!("Ok!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue