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>
This commit is contained in:
parent
b4f401675e
commit
c6cc1804e7
2 changed files with 6 additions and 7 deletions
|
@ -17,18 +17,18 @@
|
||||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
//
|
//
|
||||||
|
|
||||||
|
use libimagstore::iter::Entries;
|
||||||
use libimagstore::store::Store;
|
use libimagstore::store::Store;
|
||||||
use libimagstore::storeid::StoreIdIterator;
|
|
||||||
|
|
||||||
use failure::Fallible as Result;
|
use failure::Fallible as Result;
|
||||||
|
|
||||||
pub trait AnnotationFetcher {
|
pub trait AnnotationFetcher<'a> {
|
||||||
fn all_annotations(&self) -> Result<StoreIdIterator>;
|
fn all_annotations(&'a self) -> Result<Entries<'a>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> AnnotationFetcher for Store {
|
impl<'a> AnnotationFetcher<'a> for Store {
|
||||||
fn all_annotations(&self) -> Result<StoreIdIterator> {
|
fn all_annotations(&'a self) -> Result<Entries<'a>> {
|
||||||
self.entries().map(|iter| iter.in_collection("annotation").without_store())
|
self.entries().map(|iter| iter.in_collection("annotation"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,6 @@ impl CategoryStore for Store {
|
||||||
mod tests {
|
mod tests {
|
||||||
extern crate env_logger;
|
extern crate env_logger;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::sync::Arc;
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue