Impl BookmarkCollection::add_link()

This commit is contained in:
Matthias Beyer 2016-07-08 16:30:11 +02:00
parent db21fa9dd4
commit 2ed07d4f7d

View file

@ -95,8 +95,12 @@ impl<'a> BookmarkCollection<'a> {
.map_err_into(BEK::StoreReadError) .map_err_into(BEK::StoreReadError)
} }
pub fn add_link(&self, l: Link) -> Result<()> { pub fn add_link(&mut self, l: Link) -> Result<()> {
unimplemented!() 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<Link> { pub fn get_link(&self, l: Link) -> Result<Link> {