Do not ignore errors when collecting links

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2019-03-09 12:39:56 +01:00
parent 581da9c9cf
commit 19622f41ae

View file

@ -409,10 +409,11 @@ impl ExternalLinker for Entry {
debug!("Getting links"); debug!("Getting links");
self.get_external_links(store) self.get_external_links(store)
.and_then(|links| { .and_then(|links| {
// TODO: Do not ignore errors here let mut links = links.collect::<Result<Vec<_>>>()?;
let mut links = links.filter_map(Result::ok).collect::<Vec<_>>();
debug!("Adding link = '{:?}' to links = {:?}", link, links); debug!("Adding link = '{:?}' to links = {:?}", link, links);
links.push(link); links.push(link);
debug!("Setting {} links = {:?}", links.len(), links); debug!("Setting {} links = {:?}", links.len(), links);
self.set_external_links(store, links) self.set_external_links(store, links)
}) })