Diffstat (limited to 'src/protocol/visitor/recoverable.rs')
| -rw-r--r-- | src/protocol/visitor/recoverable.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/protocol/visitor/recoverable.rs b/src/protocol/visitor/recoverable.rs index b0d14de..e64820a 100644 --- a/src/protocol/visitor/recoverable.rs +++ b/src/protocol/visitor/recoverable.rs @@ -1,6 +1,6 @@ use crate::{ any::TypeName, - effect::{Effect, Future}, + effect::{Effect, ObjSafe}, higher_ranked_type, hkt::Marker, protocol::{ @@ -16,7 +16,7 @@ pub trait Recoverable<'ctx, E: Effect> { fn visit<'a>( &'a mut self, scope: DynRecoverableScope<'a, 'ctx, E>, - ) -> Future<'a, VisitResult<DynRecoverableScope<'a, 'ctx, E>>, E>; + ) -> ObjSafe<'a, VisitResult<DynRecoverableScope<'a, 'ctx, E>>, E>; } pub struct RecoverableProto<E: Effect>(Marker<E>); @@ -38,7 +38,7 @@ higher_ranked_type! { } pub trait RecoverableScope<'ctx, E: Effect> { - fn new_walk<'a>(&'a mut self, visitor: DynVisitor<'a, 'ctx>) -> Future<'a, Status, E>; + fn new_walk<'a>(&'a mut self, visitor: DynVisitor<'a, 'ctx>) -> ObjSafe<'a, Status, E>; } pub type DynRecoverableScope<'a, 'ctx, E> = @@ -67,12 +67,12 @@ impl<E: Effect> HintMeta for RecoverableProto<E> { pub fn visit_recoverable<'a, 'ctx, E: Effect>( visitor: DynVisitor<'a, 'ctx>, scope: DynRecoverableScope<'a, 'ctx, E>, -) -> Future<'a, VisitResult<DynRecoverableScope<'a, 'ctx, E>>, E> { +) -> ObjSafe<'a, VisitResult<DynRecoverableScope<'a, 'ctx, E>>, E> { if let Some(object) = visitor.0.upcast_mut::<RecoverableProto<E>>() { // Allow the visitor to give a hint if it wants. object.visit(scope) } else { // If the visitor doesn't support request hint then we continue. - E::ready(VisitResult::Skipped(scope)) + E::ready(VisitResult::Skipped(scope)).into() } } |