Fix libimagtodo for new StoreId interface with Entries iterator
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
14a2485a8a
commit
b383e082fb
2 changed files with 6 additions and 6 deletions
|
@ -17,22 +17,22 @@
|
||||||
// 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::storeid::StoreIdIterator;
|
use libimagstore::iter::Entries;
|
||||||
use libimagstore::storeid::StoreId;
|
use libimagstore::storeid::StoreId;
|
||||||
|
|
||||||
use failure::Fallible as Result;
|
use failure::Fallible as Result;
|
||||||
|
|
||||||
pub struct TaskIdIterator(StoreIdIterator);
|
pub struct TaskIdIterator<'a>(Entries<'a>);
|
||||||
|
|
||||||
impl TaskIdIterator {
|
impl<'a> TaskIdIterator<'a> {
|
||||||
|
|
||||||
pub fn new(inner: StoreIdIterator) -> Self {
|
pub fn new(inner: Entries<'a>) -> Self {
|
||||||
TaskIdIterator(inner)
|
TaskIdIterator(inner)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Iterator for TaskIdIterator {
|
impl<'a> Iterator for TaskIdIterator<'a> {
|
||||||
type Item = Result<StoreId>;
|
type Item = Result<StoreId>;
|
||||||
|
|
||||||
fn next(&mut self) -> Option<Self::Item> {
|
fn next(&mut self) -> Option<Self::Item> {
|
||||||
|
|
|
@ -162,7 +162,7 @@ impl<'a> TaskStore<'a> for Store {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn all_tasks(&self) -> Result<TaskIdIterator> {
|
fn all_tasks(&self) -> Result<TaskIdIterator> {
|
||||||
self.entries().map(|i| TaskIdIterator::new(i.without_store()))
|
self.entries().map(|i| TaskIdIterator::new(i))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn new_from_twtask(&'a self, task: TTask) -> Result<FileLockEntry<'a>> {
|
fn new_from_twtask(&'a self, task: TTask) -> Result<FileLockEntry<'a>> {
|
||||||
|
|
Loading…
Reference in a new issue