mirror of
https://github.com/async-rs/async-std.git
synced 2025-02-28 15:19:41 +00:00
Merge #208
208: add stream::join r=stjepang a=yoshuawuyts Ref #129 #187. This adds the `stream::join` which can join multiple streams into a single stream. Thanks! ## Example ```rust let a = stream::once(1u8); let b = stream::once(2u8); let c = stream::once(3u8); let mut s = stream::join!(a, b, c); assert_eq!(s.collect().await, vec![1u8, 2u8, 3u8]); ``` ## Screenshot  Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
This commit is contained in:
commit
f45b39d7c0
2 changed files with 5 additions and 0 deletions
|
@ -25,6 +25,7 @@ docs = []
|
|||
unstable = []
|
||||
|
||||
[dependencies]
|
||||
async-macros = "1.0.0"
|
||||
async-task = "1.0.0"
|
||||
cfg-if = "0.1.9"
|
||||
crossbeam-channel = "0.3.9"
|
||||
|
|
|
@ -42,5 +42,9 @@ cfg_if! {
|
|||
pub use double_ended_stream::DoubleEndedStream;
|
||||
pub use from_stream::FromStream;
|
||||
pub use into_stream::IntoStream;
|
||||
|
||||
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
|
||||
#[doc(inline)]
|
||||
pub use async_macros::{join_stream as join, JoinStream as Join};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue