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,18 +36,25 @@ impl<'a> Note<'a> {
{ {
let mut entry = lockentry.deref_mut(); let mut entry = lockentry.deref_mut();
{
let mut header = entry.get_header_mut(); let mut header = entry.get_header_mut();
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() {
return Err(NE::new(NEK::StoreWriteError, Some(Box::new(setres.err().unwrap())))); let kind = NEK::StoreWriteError;
return Err(NE::new(kind, Some(Box::new(setres.err().unwrap()))));
} }
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() {
return Err(NE::new(NEK::StoreWriteError, Some(Box::new(setres.err().unwrap())))); let kind = NEK::StoreWriteError;
return Err(NE::new(kind, Some(Box::new(setres.err().unwrap()))));
} }
} }
*entry.get_content_mut() = text;
}
lockentry lockentry
}; };