Diffstat (limited to 'tests/common/protocol/sequence.rs')
| -rw-r--r-- | tests/common/protocol/sequence.rs | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/tests/common/protocol/sequence.rs b/tests/common/protocol/sequence.rs index 8bb959d..63dbc3a 100644 --- a/tests/common/protocol/sequence.rs +++ b/tests/common/protocol/sequence.rs @@ -1,7 +1,7 @@ use effectful::{ bound::{Bool, IsSend, IsSync}, - effective::{Effective, Canonical}, - environment::{Environment}, + effective::{Canonical, Effective}, + environment::Environment, forward_send_sync, }; use mockall::mock; @@ -31,10 +31,10 @@ forward_send_sync!({} {} {E: (Environment + Send)} MockSequenceVisitor<E>); // } impl<'ctx, E: Environment + Send> Sequence<'ctx, E> for MockSequenceVisitor<E> { - fn visit<'a: 'c, 'b: 'c, 'c>( - &'a mut self, - scope: DynSequenceScope<'b, 'ctx, E>, - ) -> Canonical<'c, VisitResult, E> { + fn visit<'r>( + &'r mut self, + scope: DynSequenceScope<'r, 'ctx, E>, + ) -> Canonical<'r, VisitResult, E> { E::value(self.visit(scope)).cast() } } @@ -42,7 +42,7 @@ impl<'ctx, E: Environment + Send> Sequence<'ctx, E> for MockSequenceVisitor<E> { mock! { pub SequenceScope<E: Environment> { pub fn size_hint(&mut self) -> (usize, Option<usize>); - pub fn next<'a, 'b, 'lt, 'ctx>(&'a mut self, visitor: DynVisitor<'b, 'lt, 'ctx, E>) -> Flow; + pub fn next<'r, 'ctx>(&'r mut self, visitor: DynVisitor<'r, 'ctx, E>) -> Flow; } } @@ -53,10 +53,7 @@ impl<'ctx, E: Environment + Send> SequenceScope<'ctx, E> for MockSequenceScope<E E::value(self.size_hint()).cast() } - fn next<'a: 'c, 'd: 'c, 'b: 'c, 'c>( - &'a mut self, - visitor: DynVisitor<'b, 'd, 'ctx, E>, - ) -> Canonical<'c, Flow, E> { + fn next<'r>(&'r mut self, visitor: DynVisitor<'r, 'ctx, E>) -> Canonical<'r, Flow, E> { E::value(self.next(visitor)).cast() } } |