Skip to content

Commit

Permalink
Bump event-listener and event-listener-strategy to v4 and v0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekleog committed Jan 23, 2024
1 parent c2ec71e commit c01f456
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Option<T>, SendError<T>>);
#[cfg(not(target_family = "wasm"))] // Requirement coming from event-listener-strategy
pub(crate) wait();
}

Expand All @@ -1610,7 +1611,7 @@ impl<'a, T: Clone> EventListenerFuture for SendInner<'a, T> {
type Output = Result<Option<T>, SendError<T>>;

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<Self::Output> {
Expand Down Expand Up @@ -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<T, RecvError>);
#[cfg(not(target_family = "wasm"))] // Requirement coming from event-listener-strategy
pub(crate) wait();
}

Expand All @@ -1677,7 +1679,7 @@ impl<'a, T: Clone> EventListenerFuture for RecvInner<'a, T> {
type Output = Result<T, RecvError>;

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<Self::Output> {
Expand Down

0 comments on commit c01f456

Please sign in to comment.