Diffstat (limited to 'tests/common/protocol/sequence.rs')
-rw-r--r--tests/common/protocol/sequence.rs19
1 files changed, 11 insertions, 8 deletions
diff --git a/tests/common/protocol/sequence.rs b/tests/common/protocol/sequence.rs
index 9b3f6b2..c7e68b1 100644
--- a/tests/common/protocol/sequence.rs
+++ b/tests/common/protocol/sequence.rs
@@ -32,27 +32,30 @@ any_trait! {
}
impl<'ctx, E: Effect> Sequence<'ctx, E> for MockSequenceVisitor<E> {
- fn visit<'a>(
+ fn visit<'a: 'c, 'b: 'c, 'c>(
&'a mut self,
- scope: DynSequenceScope<'a, 'ctx, E>,
- ) -> ErasedEffective<'a, VisitResult<DynSequenceScope<'a, 'ctx, E>>, E> {
- E::ready(self.visit()(&(), scope)).into_erased()
+ scope: DynSequenceScope<'b, 'ctx, E>,
+ ) -> ErasedEffective<'c, VisitResult<DynSequenceScope<'b, 'ctx, E>>, E> {
+ E::ready(self.visit()(&(), scope))
}
}
mock! {
pub SequenceScope<E> {
pub fn size_hint(&mut self) -> (usize, Option<usize>);
- pub fn next<'a, 'ctx>(&'a mut self, visitor: DynVisitor<'a, 'ctx>) -> Flow;
+ pub fn next<'a, 'b, 'ctx>(&'a mut self, visitor: DynVisitor<'b, 'ctx>) -> Flow;
}
}
impl<'ctx, E: Effect> SequenceScope<'ctx, E> for MockSequenceScope<E> {
fn size_hint(&mut self) -> ErasedEffective<'_, (usize, Option<usize>), E> {
- E::ready(self.size_hint()).into_erased()
+ E::ready(self.size_hint())
}
- fn next<'a>(&'a mut self, visitor: DynVisitor<'a, 'ctx>) -> ErasedEffective<'a, Flow, E> {
- E::ready(self.next(visitor)).into_erased()
+ fn next<'a: 'c, 'b: 'c, 'c>(
+ &'a mut self,
+ visitor: DynVisitor<'b, 'ctx>,
+ ) -> ErasedEffective<'c, Flow, E> {
+ E::ready(self.next(visitor))
}
}