Diffstat (limited to 'src/effect/async/value.rs')
-rw-r--r--src/effect/async/value.rs28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/effect/async/value.rs b/src/effect/async/value.rs
index c3a80ca..63b2e25 100644
--- a/src/effect/async/value.rs
+++ b/src/effect/async/value.rs
@@ -1,12 +1,12 @@
use core::ops::ControlFlow;
-use crate::effect::{Effective, ErasedEffective};
+use crate::effect::{Effective, ErasedEffective, Ss};
use super::{Async, BoxOrReady};
pub struct Value<T>(pub T);
-impl<'lt, U: Send + Sync + 'lt> Effective<'lt> for Value<U> {
+impl<'lt, U: Ss + 'lt> Effective<'lt> for Value<U> {
fn into_erased<B>(self) -> ErasedEffective<'lt, Self::Output, Self::Effect, B> {
BoxOrReady::Ready(self.0)
}
@@ -21,13 +21,13 @@ impl<'lt, U: Send + Sync + 'lt> Effective<'lt> for Value<U> {
core::future::ready(self.0)
}
- type Loop<'ctx: 'a, 'a, T: Send + Sync + 'a, F: Send + Sync + 'a>
+ type Loop<'ctx: 'a, 'a, T: Ss + 'a, F: Ss + 'a>
= BoxOrReady<'a, (U, T)>
where
F: for<'b> FnMut(&'b mut Self::Output) -> ErasedEffective<'b, ControlFlow<T>, Self::Effect>,
'lt: 'a;
- fn r#loop<'ctx: 'a, 'a, T: Send + Sync + 'a, F: Send + Sync + 'a>(self, mut cb: F) -> Self::Loop<'ctx, 'a, T, F>
+ fn r#loop<'ctx: 'a, 'a, T: Ss + 'a, F: Ss + 'a>(self, mut cb: F) -> Self::Loop<'ctx, 'a, T, F>
where
F: for<'b> FnMut(&'b mut Self::Output) -> ErasedEffective<'b, ControlFlow<T>, Self::Effect>,
'lt: 'a,
@@ -43,13 +43,13 @@ impl<'lt, U: Send + Sync + 'lt> Effective<'lt> for Value<U> {
}))
}
- type Map<'a, T: Send + Sync + 'a, F: Send + Sync + 'a>
+ type Map<'a, T: Ss + 'a, F: Ss + 'a>
= Value<T>
where
F: FnOnce(Self::Output) -> T,
'lt: 'a;
- fn map<'a, T: Send + Sync + 'a, F: Send + Sync + 'a>(self, cb: F) -> Self::Map<'a, T, F>
+ fn map<'a, T: Ss + 'a, F: Ss + 'a>(self, cb: F) -> Self::Map<'a, T, F>
where
F: FnOnce(Self::Output) -> T,
'lt: 'a,
@@ -57,17 +57,14 @@ impl<'lt, U: Send + Sync + 'lt> Effective<'lt> for Value<U> {
Value(cb(self.0))
}
- type Then<'a, T: Send + Sync + 'a, V: Send + Sync + 'a, F: Send + Sync + 'a>
+ type Then<'a, T: Ss + 'a, V: Ss + 'a, F: Ss + 'a>
= V
where
F: FnOnce(Self::Output) -> V,
V: Effective<'a, Output = T, Effect = Self::Effect>,
'lt: 'a;
- fn then<'a, T: Send + Sync + 'a, V: Send + Sync + 'a, F: Send + Sync + 'a>(
- self,
- cb: F,
- ) -> Self::Then<'a, T, V, F>
+ fn then<'a, T: Ss + 'a, V: Ss + 'a, F: Ss + 'a>(self, cb: F) -> Self::Then<'a, T, V, F>
where
F: FnOnce(Self::Output) -> V,
V: Effective<'a, Output = T, Effect = Self::Effect>,
@@ -76,15 +73,18 @@ impl<'lt, U: Send + Sync + 'lt> Effective<'lt> for Value<U> {
cb(self.0)
}
- type AsCtx<'ctx: 'a, 'a, T: Send + Sync + 'a, F: Send + Sync + 'a>
+ type AsCtx<'ctx: 'a, 'a, T: Ss + 'a, F: Ss + 'a>
= BoxOrReady<'a, (Self::Output, T)>
where
F: for<'b> FnOnce(&'b mut Self::Output) -> ErasedEffective<'b, T, Self::Effect, (&'b mut Self::Output, &'ctx ())>,
'lt: 'a;
- fn as_ctx<'ctx: 'a, 'a, T: Send + Sync + 'a, F: Send + Sync + 'a>(self, cb: F) -> Self::AsCtx<'ctx, 'a, T, F>
+ fn as_ctx<'ctx: 'a, 'a, T: Ss + 'a, F: Ss + 'a>(self, cb: F) -> Self::AsCtx<'ctx, 'a, T, F>
where
- F: for<'b> FnOnce(&'b mut Self::Output) -> ErasedEffective<'b, T, Self::Effect, (&'b mut Self::Output, &'ctx ())>,
+ F: for<'b> FnOnce(
+ &'b mut Self::Output,
+ )
+ -> ErasedEffective<'b, T, Self::Effect, (&'b mut Self::Output, &'ctx ())>,
'lt: 'a,
{
BoxOrReady::Boxed(Box::pin(async {