Fix libimagcontact for new StoreId interface with Entries iterator

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2018-12-30 17:40:11 +01:00
parent b383e082fb
commit 2e7c17d5dc

View file

@ -29,9 +29,9 @@ use failure::Fallible as Result;
use libimagstore::storeid::IntoStoreId; use libimagstore::storeid::IntoStoreId;
use libimagstore::storeid::StoreId; use libimagstore::storeid::StoreId;
use libimagstore::iter::Entries;
use libimagstore::store::Store; use libimagstore::store::Store;
use libimagstore::store::FileLockEntry; use libimagstore::store::FileLockEntry;
use libimagstore::storeid::StoreIdIterator;
use libimagentryutil::isa::Is; use libimagentryutil::isa::Is;
use contact::IsContact; use contact::IsContact;
@ -51,7 +51,7 @@ pub trait ContactStore<'a> {
// getting // getting
fn all_contacts(&'a self) -> Result<StoreIdIterator>; fn all_contacts(&'a self) -> Result<Entries<'a>>;
} }
/// The extension for the Store to work with contacts /// The extension for the Store to work with contacts
@ -76,8 +76,8 @@ impl<'a> ContactStore<'a> for Store {
postprocess_fetched_entry(self.retrieve(sid)?, value) postprocess_fetched_entry(self.retrieve(sid)?, value)
} }
fn all_contacts(&'a self) -> Result<StoreIdIterator> { fn all_contacts(&'a self) -> Result<Entries<'a>> {
self.entries().map(|iter| iter.in_collection("contact").without_store()) self.entries().map(|ent| ent.in_collection("contact"))
} }
} }