From 02a2034d8beefa6eae21443756b1be31f1821911 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 13 Oct 2016 18:30:16 +0200 Subject: [PATCH] Fix usage of libimagentrylink interface --- imag-link/src/main.rs | 1 - libimagbookmark/src/collection.rs | 2 +- libimagentrylink/src/external.rs | 5 ++--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/imag-link/src/main.rs b/imag-link/src/main.rs index 6734c3d4..c985445a 100644 --- a/imag-link/src/main.rs +++ b/imag-link/src/main.rs @@ -97,7 +97,6 @@ fn handle_internal_linking(rt: &Runtime) { e.get_internal_links() .map(|links| { let i = links - .iter() .filter_map(|l| { l.to_str() .map_warn_err(|e| format!("Failed to convert StoreId to string: {:?}", e)) diff --git a/libimagbookmark/src/collection.rs b/libimagbookmark/src/collection.rs index 59d95e72..e37fa36c 100644 --- a/libimagbookmark/src/collection.rs +++ b/libimagbookmark/src/collection.rs @@ -114,7 +114,7 @@ impl<'a> BookmarkCollection<'a> { self.fle .get_internal_links() - .map(|v| v.into_iter().filter(|id| is_external_link_storeid(id)).collect()) + .map(|v| v.filter(|id| is_external_link_storeid(id)).collect()) .map_err_into(BEK::StoreReadError) } diff --git a/libimagentrylink/src/external.rs b/libimagentrylink/src/external.rs index f68028ff..48c3956d 100644 --- a/libimagentrylink/src/external.rs +++ b/libimagentrylink/src/external.rs @@ -133,10 +133,9 @@ impl ExternalLinker for Entry { // /link/external/ -> load these files and get the external link from their headers, // put them into the return vector. self.get_internal_links() - .map(|vect| { + .map(|iter| { debug!("Getting external links"); - vect.into_iter() - .filter(is_external_link_storeid) + iter.filter(|l| is_external_link_storeid(l)) .map(|id| { debug!("Retrieving entry for id: '{:?}'", id); match store.retrieve(id.clone()) {