diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2018-04-07 12:09:01 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2018-04-07 13:55:54 +0200 |
commit | a769186cd72de3bc2ee6cda58876e7ca11b53aad (patch) | |
tree | eda5b2fff60e58d0970311ea3b13f21f0e1f3793 /lib | |
parent | 7549cc209a65c2f2b21d94736dcde99bd11d1523 (diff) |
Make iterator lifetimes less restricting
Diffstat (limited to 'lib')
-rw-r--r-- | lib/core/libimagstore/src/iter.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/core/libimagstore/src/iter.rs b/lib/core/libimagstore/src/iter.rs index b5d82348..0171a93b 100644 --- a/lib/core/libimagstore/src/iter.rs +++ b/lib/core/libimagstore/src/iter.rs @@ -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) |