Merge pull request #1379 from matthiasbeyer/libimagstore/iter-lifetimes-less-restricting
libimagstore: Make iterator lifetimes less restricting
This commit is contained in:
commit
8b29e9d748
1 changed files with 3 additions and 3 deletions
|
@ -32,10 +32,10 @@ macro_rules! mk_iterator {
|
|||
use store::Store;
|
||||
use error::Result;
|
||||
|
||||
pub struct $itername<'a>(Box<Iterator<Item = StoreId>>, &'a Store);
|
||||
pub struct $itername<'a>(Box<Iterator<Item = StoreId> + 'a>, &'a Store);
|
||||
|
||||
impl<'a> $itername<'a> {
|
||||
pub fn new(inner: Box<Iterator<Item = StoreId>>, store: &'a Store) -> Self {
|
||||
pub fn new(inner: Box<Iterator<Item = StoreId> + 'a>, store: &'a Store) -> Self {
|
||||
$itername(inner, store)
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ macro_rules! mk_iterator {
|
|||
}
|
||||
|
||||
impl<'a, I> $extname<'a> for I
|
||||
where I: Iterator<Item = StoreId> + 'static
|
||||
where I: Iterator<Item = StoreId> + 'a
|
||||
{
|
||||
fn $extfnname(self, store: &'a Store) -> $itername<'a> {
|
||||
$itername(Box::new(self), store)
|
||||
|
|
Loading…
Reference in a new issue