Diffstat (limited to 'tests/common/protocol/sequence.rs')
| -rw-r--r-- | tests/common/protocol/sequence.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/tests/common/protocol/sequence.rs b/tests/common/protocol/sequence.rs index c7e68b1..43e71db 100644 --- a/tests/common/protocol/sequence.rs +++ b/tests/common/protocol/sequence.rs @@ -13,14 +13,9 @@ use treaty::{ Flow, }; -pub type SequenceScopeFactory<E> = for<'a, 'ctx> fn( - &'ctx (), - DynSequenceScope<'a, 'ctx, E>, -) -> VisitResult<DynSequenceScope<'a, 'ctx, E>>; - mock! { pub SequenceVisitor<E> { - pub fn visit(&mut self) -> SequenceScopeFactory<E>; + pub fn visit<'a, 'ctx>(&mut self, scope: DynSequenceScope<'a, 'ctx, E>) -> VisitResult; } } @@ -35,8 +30,8 @@ impl<'ctx, E: Effect> Sequence<'ctx, E> for MockSequenceVisitor<E> { fn visit<'a: 'c, 'b: 'c, 'c>( &'a mut self, scope: DynSequenceScope<'b, 'ctx, E>, - ) -> ErasedEffective<'c, VisitResult<DynSequenceScope<'b, 'ctx, E>>, E> { - E::ready(self.visit()(&(), scope)) + ) -> ErasedEffective<'c, VisitResult, E> { + E::ready(self.visit(scope)) } } |