lib: Implement add_link()
This commit is contained in:
parent
339ec08a83
commit
b7a5f57e3a
1 changed files with 4 additions and 1 deletions
|
@ -19,7 +19,10 @@ pub fn set_links(header: &mut EntryHeader, links: Links) -> Result<Links> {
|
|||
}
|
||||
|
||||
pub fn add_link(header: &mut EntryHeader, link: Link) -> Result<()> {
|
||||
unimplemented!()
|
||||
get_links(header).and_then(|mut links| {
|
||||
links.add(link);
|
||||
set_links(header, links).map(|_| ())
|
||||
})
|
||||
}
|
||||
|
||||
fn process_rw_result(links: StoreResult<Option<Value>>) -> Result<Links> {
|
||||
|
|
Loading…
Reference in a new issue