Diffstat (limited to 'tests/common/protocol/recoverable.rs')
| -rw-r--r-- | tests/common/protocol/recoverable.rs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/common/protocol/recoverable.rs b/tests/common/protocol/recoverable.rs index f1dab5c..47c6d21 100644 --- a/tests/common/protocol/recoverable.rs +++ b/tests/common/protocol/recoverable.rs @@ -1,7 +1,7 @@ use mockall::mock; use treaty::{ any::{any_trait, TypeName}, - effect::{Effect, Future}, + effect::{Effect, Effective, ErasedEffective}, protocol::{ visitor::{DynRecoverableScope, Recoverable, RecoverableProto, RecoverableScope}, DynWalker, @@ -39,19 +39,22 @@ impl<'ctx, E: Effect> Recoverable<'ctx, E> for MockRecoverableVisitor<E> { fn visit<'a>( &'a mut self, scope: DynRecoverableScope<'a, 'ctx, E>, - ) -> Future<'a, VisitResult<DynRecoverableScope<'a, 'ctx, E>>, E> { - E::ready(self.visit()(&(), scope)) + ) -> ErasedEffective<'a, VisitResult<DynRecoverableScope<'a, 'ctx, E>>, E> { + E::ready(self.visit()(&(), scope)).into_erased() } } mock! { pub RecoverableScopeVisitor<E> { - pub fn new_walk<'a, 'ctx>(&'a mut self, visitor: DynVisitor<'a, 'ctx>) -> Status; + pub fn new_walk<'a, 'b, 'ctx>(&'a mut self, visitor: DynVisitor<'b, 'ctx>) -> Status; } } impl<'ctx, E: Effect> RecoverableScope<'ctx, E> for MockRecoverableScopeVisitor<E> { - fn new_walk<'a>(&'a mut self, visitor: DynVisitor<'a, 'ctx>) -> Future<'a, Status, E> { - E::ready(self.new_walk(visitor)) + fn new_walk<'a: 'c, 'b: 'c, 'c>( + &'a mut self, + visitor: DynVisitor<'b, 'ctx>, + ) -> ErasedEffective<'c, Status, E> { + E::ready(self.new_walk(visitor)).into_erased() } } |