Diffstat (limited to 'src/build/builders/core/bool.rs')
| -rw-r--r-- | src/build/builders/core/bool.rs | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/build/builders/core/bool.rs b/src/build/builders/core/bool.rs index 208e88b..fd41ed6 100644 --- a/src/build/builders/core/bool.rs +++ b/src/build/builders/core/bool.rs @@ -1,4 +1,4 @@ -use core::{marker::PhantomData, ops::ControlFlow}; +use core::marker::PhantomData; use crate::{ any::static_wrapper::{DynOwnedStatic, OwnedStatic}, @@ -11,7 +11,7 @@ use crate::{ Flow, }; -impl<'ctx, M, E: Effect<'ctx>> crate::Build<'ctx, M, E> for bool { +impl<'ctx, M, E: Effect> crate::Build<'ctx, M, E> for bool { type Builder = Builder<E>; } @@ -38,16 +38,16 @@ impl<E> crate::BuilderTypes for Builder<E> { type Seed = (); } -impl<'ctx, E: Effect<'ctx>> crate::Builder<'ctx, E> for Builder<E> { +impl<'ctx, E: Effect> crate::Builder<'ctx, E> for Builder<E> { #[inline] - fn build<'a>(self) -> Future<'a, 'ctx, Result<Self::Value, Self::Error>, E> + fn build<'a>(self) -> Future<'a, Result<Self::Value, Self::Error>, E> where Self: 'a, { E::wrap(core::future::ready(self.0.ok_or(Error::Incomplete))) } - fn from_seed<'a>(_seed: Self::Seed) -> Future<'a, 'ctx, Self, E> + fn from_seed<'a>(_seed: Self::Seed) -> Future<'a, Self, E> where Self: 'a, { @@ -62,12 +62,15 @@ impl<'ctx, E: Effect<'ctx>> crate::Builder<'ctx, E> for Builder<E> { any_trait! { impl['ctx, E] Builder<E> = [ DynValue<'ctx, DynOwnedStatic<bool>, E>, - ] where E: Effect<'ctx> + ] where E: Effect } -impl<'ctx, E: Effect<'ctx>> Value<'ctx, DynOwnedStatic<bool>, E> for Builder<E> { +impl<'ctx, E: Effect> Value<'ctx, DynOwnedStatic<bool>, E> for Builder<E> { #[inline] - fn visit<'a>(&'a mut self, OwnedStatic(value): OwnedStatic<bool>) -> Future<'a, 'ctx, Flow, E> { + fn visit<'a>(&'a mut self, OwnedStatic(value): OwnedStatic<bool>) -> Future<'a, Flow, E> + where + 'ctx: 'a + { self.0 = Some(value); E::ready(Flow::Continue) } |