Diffstat (limited to 'tests/common/protocol/sequence.rs')
-rw-r--r--tests/common/protocol/sequence.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/common/protocol/sequence.rs b/tests/common/protocol/sequence.rs
index 3ebc13f..dfc2b36 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,
- environment::{Environment, NativeForm},
+ effective::{Effective, Canonical},
+ environment::{Environment},
forward_send_sync,
};
use mockall::mock;
@@ -21,7 +21,7 @@ mock! {
}
}
-forward_send_sync!({} {} {E: (Environment)} MockSequenceVisitor<E>);
+forward_send_sync!({} {} {E: (Environment + Send)} MockSequenceVisitor<E>);
// any_trait! {
// impl['ctx][E] MockSequenceVisitor<E> = [
@@ -30,11 +30,11 @@ forward_send_sync!({} {} {E: (Environment)} MockSequenceVisitor<E>);
// E: Environment,
// }
-impl<'ctx, E: Environment> Sequence<'ctx, E> for 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>,
- ) -> NativeForm<'c, VisitResult, E> {
+ ) -> Canonical<'c, VisitResult, E> {
E::value(self.visit(scope)).cast()
}
}
@@ -46,17 +46,17 @@ mock! {
}
}
-forward_send_sync!({} {} {E: (Environment)} MockSequenceScope<E>);
+forward_send_sync!({} {} {E: (Environment + Send)} MockSequenceScope<E>);
-impl<'ctx, E: Environment> SequenceScope<'ctx, E> for MockSequenceScope<E> {
- fn size_hint(&mut self) -> NativeForm<'_, (usize, Option<usize>), E> {
+impl<'ctx, E: Environment + Send> SequenceScope<'ctx, E> for MockSequenceScope<E> {
+ fn size_hint(&mut self) -> Canonical<'_, (usize, Option<usize>), E> {
E::value(self.size_hint()).cast()
}
fn next<'a: 'c, 'b: 'c, 'c>(
&'a mut self,
visitor: DynVisitor<'b, 'ctx, E>,
- ) -> NativeForm<'c, Flow, E> {
+ ) -> Canonical<'c, Flow, E> {
E::value(self.next(visitor)).cast()
}
}