Diffstat (limited to 'tests/protocol_visitor_request_hint.rs')
| -rw-r--r-- | tests/protocol_visitor_request_hint.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/protocol_visitor_request_hint.rs b/tests/protocol_visitor_request_hint.rs index 098e24d..40634ac 100644 --- a/tests/protocol_visitor_request_hint.rs +++ b/tests/protocol_visitor_request_hint.rs @@ -7,7 +7,6 @@ use common::{ use mockall::predicate::eq; use treaty::{ any::{OwnedStatic, TypeNameId}, - effect::blocking::Blocking, protocol::{ visitor::{RequestHint, RequestHintProto, ValueKnown, ValueProto, VisitResult}, walker::hint::HintProto, @@ -16,7 +15,7 @@ use treaty::{ Flow, }; -use crate::common::protocol::hint::KnownFactory; +use crate::common::{protocol::hint::KnownFactory, Blocking}; mod common; @@ -33,7 +32,7 @@ fn hints_can_be_requested() { // Get the known for the value protocol. assert_eq!( - obj.known(&()).value(), + obj.known(&()).into_value(), Ok(ValueKnown { preview: Some(&OwnedStatic(42)) }) @@ -46,13 +45,13 @@ fn hints_can_be_requested() { // This mock becomes the visitor. let visitor: &mut dyn RequestHint<Blocking> = &mut mock; - let mut mock = MockWalker::<(), ()>::new(); + let mut mock = MockWalker::<(), (), Blocking>::new(); // The visitor will lookup the value protocol on the walker. mock.expect_traits_mut() .once() .with(eq(TypeNameId::of::< - HintProto<ValueProto<OwnedStatic<i32>, Blocking>>, + HintProto<ValueProto<OwnedStatic<i32>, Blocking>>, Blocking >())) .returning(|_id| { let mut mock = MockHintWalker::<ValueProto<OwnedStatic<i32>, Blocking>>::new(); @@ -71,7 +70,7 @@ fn hints_can_be_requested() { // Request a hint from the visitor. assert!(matches!( - visitor.request_hint(DynWalker(&mut mock)).value(), + visitor.request_hint(DynWalker(&mut mock)).into_value(), VisitResult::Control(Flow::Done) )); } @@ -82,7 +81,7 @@ fn request_hint_proto() { let id = TypeId::of::<RequestHintProto<Blocking>>(); // The type id for the lifetime containing value protocol trait object. - let name_id = TypeNameId::of_lower::<dyn RequestHint<Blocking> + Send + Sync>(); + let name_id = TypeNameId::of_lower::<dyn RequestHint<Blocking>, Blocking>(); // They should be the same. assert_eq!(id, name_id.into_type_id()); |