Skip to content

Commit 5795375

Browse files
authored
Merge pull request #111 from EspressoSystems/dependabot/cargo/async-channel-2.2.0
build(deps): bump async-channel from 1.9.0 to 2.2.0
2 parents a4ea7aa + 37a1fe7 commit 5795375

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ tokio = { version = "1", features = [
8383
tokio-stream = { version = "0.1.14" }
8484

8585
[target.'cfg(all(async_channel_impl = "async-std"))'.dependencies]
86-
async-channel = { version = "1.9.0" }
86+
async-std = { version = "1.12", features = [
87+
"attributes",
88+
"unstable",
89+
]}
8790

8891
[target.'cfg(all(async_channel_impl = "flume"))'.dependencies]
8992
flume = { version = "0.11.0" }

src/channel/bounded.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ mod inner {
7777
/// inner module, used to group feature-specific imports
7878
#[cfg(async_channel_impl = "async-std")]
7979
mod inner {
80-
pub use async_channel::{RecvError, SendError, TryRecvError};
80+
pub use async_std::channel::{RecvError, SendError, TryRecvError};
8181

82-
use async_channel::{Receiver as InnerReceiver, Sender as InnerSender};
82+
use async_std::channel::{Receiver as InnerReceiver, Sender as InnerSender};
8383

8484
/// A bounded sender, created with [`channel`]
8585
pub struct Sender<T>(pub(super) InnerSender<T>);
@@ -99,7 +99,7 @@ mod inner {
9999
/// Create a bounded sender/receiver pair, limited to `len` messages at a time.
100100
#[must_use]
101101
pub fn bounded<T>(len: usize) -> (Sender<T>, Receiver<T>) {
102-
let (sender, receiver) = async_channel::bounded(len);
102+
let (sender, receiver) = async_std::channel::bounded(len);
103103

104104
(Sender(sender), Receiver(receiver))
105105
}
@@ -227,7 +227,7 @@ impl<T> Stream for BoundedStream<T> {
227227
cx,
228228
);
229229
#[cfg(async_channel_impl = "async-std")]
230-
return <async_channel::Receiver<T> as Stream>::poll_next(Pin::new(&mut self.0), cx);
230+
return <async_std::channel::Receiver<T> as Stream>::poll_next(Pin::new(&mut self.0), cx);
231231
}
232232
}
233233

src/channel/unbounded.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ impl<T> Stream for UnboundedStream<T> {
271271
cx,
272272
);
273273
#[cfg(async_channel_impl = "async-std")]
274-
return <async_channel::Receiver<T> as Stream>::poll_next(Pin::new(&mut self.0), cx);
274+
return <async_std::channel::Receiver<T> as Stream>::poll_next(Pin::new(&mut self.0), cx);
275275
}
276276
}
277277

0 commit comments

Comments
 (0)