Diffstat (limited to 'tests/common/protocol/recoverable.rs')
-rw-r--r--tests/common/protocol/recoverable.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/common/protocol/recoverable.rs b/tests/common/protocol/recoverable.rs
index 1ccce92..c338b09 100644
--- a/tests/common/protocol/recoverable.rs
+++ b/tests/common/protocol/recoverable.rs
@@ -16,15 +16,9 @@ use treaty::{
Flow, Status,
};
-pub type RecoverableScopeFactory<E> =
- for<'a, 'ctx> fn(
- &'ctx (),
- DynRecoverableScope<'a, 'ctx, E>,
- ) -> VisitResult<DynRecoverableScope<'a, 'ctx, E>>;
-
mock! {
pub RecoverableVisitor<E> {
- pub fn visit(&mut self) -> RecoverableScopeFactory<E>;
+ pub fn visit<'a, 'ctx>(&mut self, scope: DynRecoverableScope<'a, 'ctx, E>) -> VisitResult;
}
}
@@ -39,8 +33,8 @@ impl<'ctx, E: Effect> Recoverable<'ctx, E> for MockRecoverableVisitor<E> {
fn visit<'a>(
&'a mut self,
scope: DynRecoverableScope<'a, 'ctx, E>,
- ) -> ErasedEffective<'a, VisitResult<DynRecoverableScope<'a, 'ctx, E>>, E> {
- E::ready(self.visit()(&(), scope))
+ ) -> ErasedEffective<'a, VisitResult, E> {
+ E::ready(self.visit(scope))
}
}