libimagnotes: Replace .err().unwrap() with .unwrap_err()

This commit is contained in:
Matthias Beyer 2016-04-17 21:08:37 +02:00
parent e08986842c
commit 9ada2d9c98

View file

@ -32,7 +32,7 @@ impl<'a> Note<'a> {
let fle = { let fle = {
let lockentry = store.create(ModuleEntryPath::new(name.clone()).into_storeid()); let lockentry = store.create(ModuleEntryPath::new(name.clone()).into_storeid());
if lockentry.is_err() { if lockentry.is_err() {
return Err(NE::new(NEK::StoreWriteError, Some(Box::new(lockentry.err().unwrap())))); return Err(NE::new(NEK::StoreWriteError, Some(Box::new(lockentry.unwrap_err()))));
} }
let mut lockentry = lockentry.unwrap(); let mut lockentry = lockentry.unwrap();
@ -44,13 +44,13 @@ impl<'a> Note<'a> {
let setres = header.set("note", Value::Table(BTreeMap::new())); let setres = header.set("note", Value::Table(BTreeMap::new()));
if setres.is_err() { if setres.is_err() {
let kind = NEK::StoreWriteError; let kind = NEK::StoreWriteError;
return Err(NE::new(kind, Some(Box::new(setres.err().unwrap())))); return Err(NE::new(kind, Some(Box::new(setres.unwrap_err()))));
} }
let setres = header.set("note.name", Value::String(name)); let setres = header.set("note.name", Value::String(name));
if setres.is_err() { if setres.is_err() {
let kind = NEK::StoreWriteError; let kind = NEK::StoreWriteError;
return Err(NE::new(kind, Some(Box::new(setres.err().unwrap())))); return Err(NE::new(kind, Some(Box::new(setres.unwrap_err()))));
} }
} }