imag-notes: Replace .err().unwrap() with .unwrap_err()

This commit is contained in:
Matthias Beyer 2016-04-17 21:07:31 +02:00
parent da3b463ff0
commit 85800e7758

View file

@ -29,7 +29,7 @@ fn main() {
rt.unwrap() rt.unwrap()
} else { } else {
println!("Could not set up Runtime"); println!("Could not set up Runtime");
println!("{:?}", rt.err().unwrap()); println!("{:?}", rt.unwrap_err());
exit(1); exit(1);
} }
}; };
@ -81,7 +81,7 @@ fn edit(rt: &Runtime) {
fn edit_entry(rt: &Runtime, name: String) -> bool { fn edit_entry(rt: &Runtime, name: String) -> bool {
let note = Note::retrieve(rt.store(), name); let note = Note::retrieve(rt.store(), name);
if note.is_err() { if note.is_err() {
trace_error(&note.err().unwrap()); trace_error(&note.unwrap_err());
warn!("Cannot edit nonexistent Note"); warn!("Cannot edit nonexistent Note");
return false return false
} }
@ -100,7 +100,7 @@ fn list(rt: &Runtime) {
let iter = Note::all_notes(rt.store()); let iter = Note::all_notes(rt.store());
if iter.is_err() { if iter.is_err() {
trace_error(&iter.err().unwrap()); trace_error(&iter.unwrap_err());
exit(1); exit(1);
} }