Skip to content

Commit f45b39d

Browse files
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 ![Screenshot_2019-09-17 async_std stream - Rust](https://user-images.githubusercontent.com/2467194/65080099-cedb8b00-d9a0-11e9-984f-edd7d6bad5cc.png) Co-authored-by: Yoshua Wuyts <[email protected]>
2 parents 91f002d + 7fe6c8a commit f45b39d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ docs = []
2525
unstable = []
2626

2727
[dependencies]
28+
async-macros = "1.0.0"
2829
async-task = "1.0.0"
2930
cfg-if = "0.1.9"
3031
crossbeam-channel = "0.3.9"

src/stream/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,9 @@ cfg_if! {
4242
pub use double_ended_stream::DoubleEndedStream;
4343
pub use from_stream::FromStream;
4444
pub use into_stream::IntoStream;
45+
46+
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
47+
#[doc(inline)]
48+
pub use async_macros::{join_stream as join, JoinStream as Join};
4549
}
4650
}

0 commit comments

Comments
 (0)