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
187b948985
commit
ebf3f309a6
2 changed files with 4 additions and 4 deletions
|
@ -52,7 +52,7 @@ impl From<StoreIdIterator> for HabitTemplateStoreIdIterator {
|
|||
|
||||
impl<'a> From<StoreIdIteratorWithStore<'a>> for HabitTemplateStoreIdIterator {
|
||||
fn from(sii: StoreIdIteratorWithStore<'a>) -> Self {
|
||||
HabitTemplateStoreIdIterator(sii.without_store())
|
||||
HabitTemplateStoreIdIterator(sii.into_storeid_iter())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ impl From<StoreIdIterator> for HabitInstanceStoreIdIterator {
|
|||
|
||||
impl<'a> From<StoreIdIteratorWithStore<'a>> for HabitInstanceStoreIdIterator {
|
||||
fn from(sii: StoreIdIteratorWithStore<'a>) -> Self {
|
||||
HabitInstanceStoreIdIterator(sii.without_store())
|
||||
HabitInstanceStoreIdIterator(sii.into_storeid_iter())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,11 +49,11 @@ pub trait HabitStore {
|
|||
impl HabitStore for Store {
|
||||
/// Get an iterator over all habits
|
||||
fn all_habit_templates(&self) -> Result<HabitTemplateStoreIdIterator> {
|
||||
Ok(HabitTemplateStoreIdIterator::from(self.entries()?.without_store()))
|
||||
Ok(HabitTemplateStoreIdIterator::from(self.entries()?.into_storeid_iter()))
|
||||
}
|
||||
|
||||
fn all_habit_instances(&self) -> Result<HabitInstanceStoreIdIterator> {
|
||||
Ok(HabitInstanceStoreIdIterator::from(self.entries()?.without_store()))
|
||||
Ok(HabitInstanceStoreIdIterator::from(self.entries()?.into_storeid_iter()))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue