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:
Matthias Beyer 2019-01-05 01:09:12 +01:00
parent 83415e78b9
commit 187b948985

View file

@ -95,7 +95,7 @@ impl Diary for Store {
fn entries(&self, diary_name: &str) -> Result<DiaryEntryIterator> { fn entries(&self, diary_name: &str) -> Result<DiaryEntryIterator> {
debug!("Building iterator for module 'diary' with diary name = '{}'", diary_name); debug!("Building iterator for module 'diary' with diary name = '{}'", diary_name);
Store::entries(self) Store::entries(self)
.map(|iter| DiaryEntryIterator::new(String::from(diary_name), iter.without_store())) .map(|iter| DiaryEntryIterator::new(String::from(diary_name), iter.into_storeid_iter()))
} }
/// get the id of the youngest entry /// get the id of the youngest entry
@ -151,7 +151,7 @@ impl Diary for Store {
/// Get all diary names /// Get all diary names
fn diary_names(&self) -> Result<DiaryNameIterator> { fn diary_names(&self) -> Result<DiaryNameIterator> {
self.entries() self.entries()
.map(|it| DiaryNameIterator::new(it.without_store())) .map(|it| DiaryNameIterator::new(it.into_storeid_iter()))
.map_err(Error::from) .map_err(Error::from)
} }