lib: Add missing setting of text content

This commit is contained in:
Matthias Beyer 2016-03-21 18:53:53 +01:00
parent 97ac047df5
commit 8213b6c08f

View file

@ -36,16 +36,23 @@ impl<'a> Note<'a> {
{ {
let mut entry = lockentry.deref_mut(); let mut entry = lockentry.deref_mut();
let mut header = entry.get_header_mut();
let setres = header.set("note", Value::Table(BTreeMap::new())); {
if setres.is_err() { let mut header = entry.get_header_mut();
return Err(NE::new(NEK::StoreWriteError, Some(Box::new(setres.err().unwrap())))); let setres = header.set("note", Value::Table(BTreeMap::new()));
if setres.is_err() {
let kind = NEK::StoreWriteError;
return Err(NE::new(kind, Some(Box::new(setres.err().unwrap()))));
}
let setres = header.set("note.name", Value::String(name));
if setres.is_err() {
let kind = NEK::StoreWriteError;
return Err(NE::new(kind, Some(Box::new(setres.err().unwrap()))));
}
} }
let setres = header.set("note.name", Value::String(name)); *entry.get_content_mut() = text;
if setres.is_err() {
return Err(NE::new(NEK::StoreWriteError, Some(Box::new(setres.err().unwrap()))));
}
} }
lockentry lockentry