From c6cc1804e752542cd97e6538edbce524cbd7d51c Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 5 Jan 2019 01:09:12 +0100 Subject: [PATCH] Adapt to new libimagstore::iter::Entries API Use Entries::into_storeid_iter() for transforming iterator into right type. Signed-off-by: Matthias Beyer --- .../libimagentryannotation/src/annotation_fetcher.rs | 12 ++++++------ lib/entry/libimagentrycategory/src/store.rs | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/entry/libimagentryannotation/src/annotation_fetcher.rs b/lib/entry/libimagentryannotation/src/annotation_fetcher.rs index dd6c2222..6fbd0078 100644 --- a/lib/entry/libimagentryannotation/src/annotation_fetcher.rs +++ b/lib/entry/libimagentryannotation/src/annotation_fetcher.rs @@ -17,18 +17,18 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA // +use libimagstore::iter::Entries; use libimagstore::store::Store; -use libimagstore::storeid::StoreIdIterator; use failure::Fallible as Result; -pub trait AnnotationFetcher { - fn all_annotations(&self) -> Result; +pub trait AnnotationFetcher<'a> { + fn all_annotations(&'a self) -> Result>; } -impl<'a> AnnotationFetcher for Store { - fn all_annotations(&self) -> Result { - self.entries().map(|iter| iter.in_collection("annotation").without_store()) +impl<'a> AnnotationFetcher<'a> for Store { + fn all_annotations(&'a self) -> Result> { + self.entries().map(|iter| iter.in_collection("annotation")) } } diff --git a/lib/entry/libimagentrycategory/src/store.rs b/lib/entry/libimagentrycategory/src/store.rs index 4c8dbbed..d702aa0c 100644 --- a/lib/entry/libimagentrycategory/src/store.rs +++ b/lib/entry/libimagentrycategory/src/store.rs @@ -130,7 +130,6 @@ impl CategoryStore for Store { mod tests { extern crate env_logger; use std::path::PathBuf; - use std::sync::Arc; use super::*;