diff --git a/Cargo.toml b/Cargo.toml index 579de57..f47117d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,8 +22,8 @@ name = "broadcast_bench" [features] [dependencies] -event-listener = "3" -event-listener-strategy = "0.1.0" +event-listener = "4" +event-listener-strategy = "0.4.0" futures-core = "0.3.21" [dev-dependencies] diff --git a/src/lib.rs b/src/lib.rs index 9ad33f3..729f234 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1593,6 +1593,7 @@ easy_wrapper! { #[derive(Debug)] #[must_use = "futures do nothing unless .awaited"] pub struct Send<'a, T: Clone>(SendInner<'a, T> => Result, SendError>); + #[cfg(not(target_family = "wasm"))] // Requirement coming from event-listener-strategy pub(crate) wait(); } @@ -1610,7 +1611,7 @@ impl<'a, T: Clone> EventListenerFuture for SendInner<'a, T> { type Output = Result, SendError>; fn poll_with_strategy<'x, S: event_listener_strategy::Strategy<'x>>( - self: Pin<&'x mut Self>, + self: Pin<&mut Self>, strategy: &mut S, context: &mut S::Context, ) -> Poll { @@ -1662,6 +1663,7 @@ easy_wrapper! { #[derive(Debug)] #[must_use = "futures do nothing unless .awaited"] pub struct Recv<'a, T: Clone>(RecvInner<'a, T> => Result); + #[cfg(not(target_family = "wasm"))] // Requirement coming from event-listener-strategy pub(crate) wait(); } @@ -1677,7 +1679,7 @@ impl<'a, T: Clone> EventListenerFuture for RecvInner<'a, T> { type Output = Result; fn poll_with_strategy<'x, S: event_listener_strategy::Strategy<'x>>( - self: Pin<&'x mut Self>, + self: Pin<&mut Self>, strategy: &mut S, context: &mut S::Context, ) -> Poll {