Diffstat (limited to 'src/protocol/walker/hint.rs')
-rw-r--r--src/protocol/walker/hint.rs15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/protocol/walker/hint.rs b/src/protocol/walker/hint.rs
index e5a8a98..683436a 100644
--- a/src/protocol/walker/hint.rs
+++ b/src/protocol/walker/hint.rs
@@ -5,10 +5,10 @@
//! to the walker about what it is expecting.
use crate::{
- any::{AnyTrait, TypeName},
- effect::{Effect, EffectiveExt as _, ErasedEffective, ReadyExt as _, Ss},
+ any::TypeName,
+ effect::{Effect, EffectiveExt as _, ErasedEffective, ReadyExt as _},
hkt::Marker,
- protocol::{visitor::VisitResult, DynVisitor, DynWalker},
+ protocol::{visitor::VisitResult, DynWalker},
Flow,
};
@@ -49,7 +49,7 @@ impl<'a, 'ctx: 'a> Meta::LowerTypeWithBound<'a, 'ctx, &'a &'ctx ()> for () {
/// Meta information for the hint.
///
/// This gives the visitor more information to work from when selecting a hint.
-pub trait HintMeta: Send + Sync + 'static {
+pub trait HintMeta: TypeName::MemberType + Send + Sync + 'static {
/// Information known by the walker.
///
/// This should be information easy to get without changing the state of the walker
@@ -72,7 +72,7 @@ pub trait Hint<'ctx, Protocol: ?Sized + HintMeta> {
/// This should only be called once per [`RequestHint`].
fn hint<'this: 'e, 'visitor: 'e, 'hint: 'e, 'e>(
&'this mut self,
- visitor: DynVisitor<'visitor, 'ctx>,
+ visitor: &'visitor mut TypeName::T<'visitor, 'ctx, Protocol>,
hint: MetaHint<'hint, 'ctx, Protocol>,
) -> ErasedEffective<'e, Flow, Protocol::Effect>
where
@@ -110,14 +110,13 @@ pub fn hint_protocol<
'hint: 'e,
'e,
Protocol: ?Sized + HintMeta,
- V: AnyTrait<'ctx> + Ss,
>(
walker: DynWalker<'walker, 'ctx>,
- visitor: &'visitor mut V,
+ visitor: &'visitor mut TypeName::T<'visitor, 'ctx, Protocol>,
hint: MetaHint<'hint, 'ctx, Protocol>,
) -> ErasedEffective<'e, VisitResult<()>, Protocol::Effect> {
if let Some(object) = walker.0.upcast_mut::<HintProto<Protocol>>() {
- object.hint(DynVisitor(visitor), hint).map(Into::into)
+ object.hint(visitor, hint).map(Into::into)
} else {
VisitResult::Skipped(()).ready()
}