Diffstat (limited to 'src/walk/walkers/core/value.rs')
| -rw-r--r-- | src/walk/walkers/core/value.rs | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/walk/walkers/core/value.rs b/src/walk/walkers/core/value.rs index 62f5450..eec00b5 100644 --- a/src/walk/walkers/core/value.rs +++ b/src/walk/walkers/core/value.rs @@ -1,6 +1,6 @@ use crate::{ any::{BorrowedStatic, OwnedStatic}, - effect::{Effect, ObjSafe}, + effect::{Adapters, Effect, ObjSafe}, never::Never, protocol::{visitor::visit_value, DynVisitor}, WalkerTypes, @@ -43,15 +43,14 @@ impl<T> WalkerTypes for ValueWalker<T> { impl<'ctx, T: Send + Sync + 'static, E: Effect> crate::Walker<'ctx, E> for ValueWalker<T> { #[inline(always)] - fn walk<'a>( + fn walk<'b: 'c, 'c>( self, - visitor: DynVisitor<'a, 'ctx>, - ) -> ObjSafe<'a, Result<Self::Output, Self::Error>, E> - where - Self: 'a, - { + visitor: DynVisitor<'b, 'ctx>, + ) -> ObjSafe<'c, Result<Self::Output, Self::Error>, E> { // Attempt to visit using the value protocol. - todo!() + visit_value::<_, E>(visitor, OwnedStatic(self.0)) + .map(|_| Ok(())) + .into() // E::map( // visit_value::<_, E>(visitor, OwnedStatic(self.0)), // |_| Ok(()), @@ -82,13 +81,10 @@ impl<'ctx, T: ?Sized + Send + Sync + 'static, E: Effect> crate::Walker<'ctx, E> for BorrowWalker<'ctx, T> { #[inline(always)] - fn walk<'a>( + fn walk<'b: 'c, 'c>( self, - visitor: DynVisitor<'a, 'ctx>, - ) -> ObjSafe<'a, Result<Self::Output, Self::Error>, E> - where - Self: 'a, - { + visitor: DynVisitor<'b, 'ctx>, + ) -> ObjSafe<'c, Result<Self::Output, Self::Error>, E> { // Attempt to visit using the value protocol. todo!() // E::map(visit_value::<_, E>(visitor, BorrowedStatic(self.0)), |_| { |