summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-01-05 01:09:12 +0100
committerMatthias Beyer <mail@beyermatthias.de>2019-02-15 20:53:29 +0100
commitc6cc1804e752542cd97e6538edbce524cbd7d51c (patch)
tree61970d6795da23252de9df6c18455b2ee97bea06 /lib
parentb4f401675e159e9173109390ff3409d338635548 (diff)
Adapt to new libimagstore::iter::Entries API
Use Entries::into_storeid_iter() for transforming iterator into right type. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/entry/libimagentryannotation/src/annotation_fetcher.rs12
-rw-r--r--lib/entry/libimagentrycategory/src/store.rs1
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<StoreIdIterator>;
+pub trait AnnotationFetcher<'a> {
+ fn all_annotations(&'a self) -> Result<Entries<'a>>;
}
-impl<'a> AnnotationFetcher for Store {
- fn all_annotations(&self) -> Result<StoreIdIterator> {
- self.entries().map(|iter| iter.in_collection("annotation").without_store())
+impl<'a> AnnotationFetcher<'a> for Store {
+ fn all_annotations(&'a self) -> Result<Entries<'a>> {
+ 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::*;