Diffstat (limited to 'src/effect/blocking.rs')
| -rw-r--r-- | src/effect/blocking.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/effect/blocking.rs b/src/effect/blocking.rs index 39ea3ac..75d6063 100644 --- a/src/effect/blocking.rs +++ b/src/effect/blocking.rs @@ -6,13 +6,6 @@ use crate::hkt::Marker; use super::*; -pub trait BlockOn: 'static { - fn block_on<F>(future: F) -> F::Output - where - F: core::future::Future + Send, - <F as core::future::Future>::Output: Send; -} - pub struct Blocking<B = Spin>(Marker<B>); #[must_use] @@ -34,6 +27,8 @@ impl<T: Ss, B: BlockOn> Erased::Hkt<T, Blocking<B>> for Value<T, B> { } impl<B: BlockOn> Effect for Blocking<B> { + type BlockOn = B; + type Erased<T: Ss> = Value<T, B>; fn ready<'a, T: Ss + 'a>(value: T) -> ErasedEffective<'a, T, Self> { |