diff --git a/libimagbookmark/src/collection.rs b/libimagbookmark/src/collection.rs index a6e29ee0..2a820c29 100644 --- a/libimagbookmark/src/collection.rs +++ b/libimagbookmark/src/collection.rs @@ -95,8 +95,12 @@ impl<'a> BookmarkCollection<'a> { .map_err_into(BEK::StoreReadError) } - pub fn add_link(&self, l: Link) -> Result<()> { - unimplemented!() + pub fn add_link(&mut self, l: Link) -> Result<()> { + use link::IntoUrl; + + l.into_url() + .and_then(|url| self.add_external_link(self.store, url).map_err_into(BEK::LinkingError)) + .map_err_into(BEK::LinkError) } pub fn get_link(&self, l: Link) -> Result {