Diffstat (limited to 'tests/protocol_visitor_sequence.rs')
-rw-r--r--tests/protocol_visitor_sequence.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/protocol_visitor_sequence.rs b/tests/protocol_visitor_sequence.rs
index bc29ea4..4b3e7ca 100644
--- a/tests/protocol_visitor_sequence.rs
+++ b/tests/protocol_visitor_sequence.rs
@@ -3,7 +3,6 @@ use std::any::TypeId;
use common::protocol::sequence::{MockSequenceScope, MockSequenceVisitor};
use treaty::{
any::{OwnedStatic, TypeNameId},
- effect::blocking::Blocking,
protocol::{
visitor::{Sequence, SequenceProto, ValueProto, VisitResult},
DynVisitor,
@@ -11,7 +10,7 @@ use treaty::{
Flow,
};
-use crate::common::builder::MockBuilder;
+use crate::common::{builder::MockBuilder, Blocking};
mod common;
@@ -22,15 +21,15 @@ fn sequence_has_scope_with_size_hint_and_next() {
// Expect a visit with the sequence protocol.
mock.expect_visit().once().returning(|scope| {
// Get the size hint from the sequence scope.
- assert_eq!(scope.size_hint().value(), (1, Some(1)));
+ assert_eq!(scope.size_hint().into_value(), (1, Some(1)));
- let mut visitor = MockBuilder::<(), (), ()>::new();
+ let mut visitor = MockBuilder::<(), (), (), Blocking>::new();
// Expect the walker to lookup a trait.
visitor.expect_traits().once().return_const(None);
// Get the next item in the sequence from the walker.
- assert_eq!(scope.next(DynVisitor(&mut visitor)).value(), Flow::Done);
+ assert_eq!(scope.next(DynVisitor(&mut visitor)).into_value(), Flow::Done);
// We are done.
VisitResult::Control(Flow::Done)
@@ -57,7 +56,7 @@ fn sequence_has_scope_with_size_hint_and_next() {
// Visit a sequence.
assert!(matches!(
- visitor.visit(&mut scope).value(),
+ visitor.visit(&mut scope).into_value(),
VisitResult::Control(Flow::Done)
));
}
@@ -68,7 +67,7 @@ fn sequence_proto() {
let id = TypeId::of::<SequenceProto<Blocking>>();
// The type id for the lifetime containing value protocol trait object.
- let name_id = TypeNameId::of_lower::<dyn Sequence<Blocking> + Send + Sync>();
+ let name_id = TypeNameId::of_lower::<dyn Sequence<Blocking>, Blocking>();
// They should be the same.
assert_eq!(id, name_id.into_type_id());