lib: Add missing setting of text content
This commit is contained in:
parent
97ac047df5
commit
8213b6c08f
1 changed files with 15 additions and 8 deletions
|
@ -36,16 +36,23 @@ impl<'a> Note<'a> {
|
|||
|
||||
{
|
||||
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() {
|
||||
return Err(NE::new(NEK::StoreWriteError, Some(Box::new(setres.err().unwrap()))));
|
||||
|
||||
{
|
||||
let mut header = entry.get_header_mut();
|
||||
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));
|
||||
if setres.is_err() {
|
||||
return Err(NE::new(NEK::StoreWriteError, Some(Box::new(setres.err().unwrap()))));
|
||||
}
|
||||
*entry.get_content_mut() = text;
|
||||
}
|
||||
|
||||
lockentry
|
||||
|
|
Loading…
Reference in a new issue