Skip to content

add stream::join #208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 19, 2019
Merged

add stream::join #208

merged 1 commit into from
Sep 19, 2019

Conversation

yoshuawuyts
Copy link
Contributor

Ref #129 #187. This adds the stream::join which can join multiple streams into a single stream. Thanks!

Example

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

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
@ghost
Copy link

ghost commented Sep 19, 2019

bors r+

bors bot added a commit that referenced this pull request Sep 19, 2019
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 <yoshuawuyts@gmail.com>
@bors
Copy link
Contributor

bors bot commented Sep 19, 2019

Build succeeded

  • continuous-integration/travis-ci/push

@bors bors bot merged commit 7fe6c8a into master Sep 19, 2019
@yoshuawuyts yoshuawuyts deleted the stream-join branch September 19, 2019 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant