Diffstat (limited to 'tests/common/protocol/request_hint.rs')
-rw-r--r--tests/common/protocol/request_hint.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/common/protocol/request_hint.rs b/tests/common/protocol/request_hint.rs
index dc57b5e..63c423d 100644
--- a/tests/common/protocol/request_hint.rs
+++ b/tests/common/protocol/request_hint.rs
@@ -7,12 +7,9 @@ use treaty::{
Flow,
};
-pub type RequestHintFactory =
- for<'a, 'ctx> fn(&'ctx (), DynWalker<'a, 'ctx>) -> VisitResult<DynWalker<'a, 'ctx>>;
-
mock! {
pub RequestHintVisitor<E> {
- pub fn request_hint(&mut self) -> RequestHintFactory;
+ pub fn request_hint<'a, 'ctx>(&mut self, walker: DynWalker<'a, 'ctx>) -> VisitResult;
}
}
@@ -24,10 +21,13 @@ any_trait! {
}
impl<'ctx, E: Effect> RequestHint<'ctx, E> for MockRequestHintVisitor<E> {
- fn request_hint<'a>(
- &'a mut self,
- walker: DynWalker<'a, 'ctx>,
- ) -> ErasedEffective<'a, VisitResult<DynWalker<'a, 'ctx>>, E> {
- E::ready(self.request_hint()(&(), walker))
+ fn request_hint<'this: 'e, 'walker: 'e, 'e>(
+ &'this mut self,
+ walker: DynWalker<'walker, 'ctx>,
+ ) -> ErasedEffective<'e, VisitResult, E>
+ where
+ 'ctx: 'this + 'walker,
+ {
+ E::ready(self.request_hint(walker))
}
}