Diffstat (limited to 'tests/common/protocol/tag.rs')
-rw-r--r--tests/common/protocol/tag.rs25
1 files changed, 12 insertions, 13 deletions
diff --git a/tests/common/protocol/tag.rs b/tests/common/protocol/tag.rs
index 8c589d0..0882ea6 100644
--- a/tests/common/protocol/tag.rs
+++ b/tests/common/protocol/tag.rs
@@ -1,8 +1,8 @@
use effectful::{
- bound::{Bool, IsSend, IsSync},
- effective::{Effective, Canonical},
- environment::{Environment},
blocking::BlockingSpin,
+ bound::{Bool, IsSend, IsSync},
+ effective::{Canonical, Effective},
+ environment::Environment,
forward_send_sync,
};
use mockall::mock;
@@ -18,7 +18,7 @@ use treaty::{
mock! {
pub TagVisitor<K: TagKind<E>, E: Environment> {
- pub fn visit<'a, 'lt, 'ctx>(&'a mut self, kind: K, walker: DynWalkerObjSafe<'a, 'lt, 'ctx, E>) -> VisitResult;
+ pub fn visit<'r, 'ctx>(&'r mut self, kind: K, walker: DynWalkerObjSafe<'r, 'ctx, E>) -> VisitResult;
}
}
@@ -33,32 +33,31 @@ forward_send_sync!({K: (TagKind<E> + Send)} {} {E: (Environment + Send)} MockTag
// }
impl<'ctx, K: TagKind<E> + Send, E: Environment + Send> Tag<'ctx, K, E> for MockTagVisitor<K, E> {
- fn visit<'a: 'c, 'b: 'c, 'd: 'c, 'c>(
- &'a mut self,
+ fn visit<'r>(
+ &'r mut self,
kind: K,
- walker: DynWalkerObjSafe<'b, 'd, 'ctx, E>,
- ) -> Canonical<'c, VisitResult, E> {
+ walker: DynWalkerObjSafe<'r, 'ctx, E>,
+ ) -> Canonical<'r, VisitResult, E> {
E::value(self.visit(kind, walker)).cast()
}
}
-pub trait TagVisitorExt<'lt, 'ctx> {
+pub trait TagVisitorExt<'ctx> {
fn visit_tag_and_done<'a, T: ConstTagKind<BlockingSpin>, W: Walker<'ctx, BlockingSpin>>(
&'a mut self,
walker: W,
);
}
-impl<'lt, 'ctx, T> TagVisitorExt<'lt, 'ctx> for T
+impl<'ctx, T> TagVisitorExt<'ctx> for T
where
- T: AsVisitor<'lt, 'ctx, BlockingSpin>,
+ T: AsVisitor<'ctx, BlockingSpin>,
{
fn visit_tag_and_done<'a, Tag: ConstTagKind<BlockingSpin>, W: Walker<'ctx, BlockingSpin>>(
&'a mut self,
walker: W,
) {
- let result =
- visit_tag::<Tag, BlockingSpin, _>(Tag::NEW, self.as_visitor(), walker).wait();
+ let result = visit_tag::<Tag, BlockingSpin, _>(Tag::NEW, self.as_visitor(), walker).wait();
assert_eq!(result.unwrap(), VisitResult::Control(Flow::Done));
}