Replace complex match with if let Err(e)

This commit is contained in:
Matthias Beyer 2016-09-04 17:46:32 +02:00
parent 44675a4b4f
commit 4ddb558837

View file

@ -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!");
} }