Skip to content
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

Implement Stream for broadcast::Receiver #2012

Merged
merged 2 commits into from
Dec 21, 2019
Merged

Conversation

bIgBV
Copy link
Contributor

@bIgBV bIgBV commented Dec 21, 2019

Motivation

The broadcast Receiver doesn't have a Stream impl.

Solution

Implement Stream for broadcast::Receiver

@carllerche
Copy link
Member

This is probably going to require a merge master / update once #2007 lands.

Copy link
Member

@carllerche carllerche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@bIgBV
Copy link
Contributor Author

bIgBV commented Dec 21, 2019

I'll keep track of it and update this PR once that lands.

@carllerche
Copy link
Member

Mind merging?

@bIgBV
Copy link
Contributor Author

bIgBV commented Dec 21, 2019

Done

@bIgBV
Copy link
Contributor Author

bIgBV commented Dec 21, 2019

I'm not entirely sure why the rustfmt job is failing, as running it locally doesn't show any changes.

@carllerche
Copy link
Member

Because cargo fmt is broken :)

We should add a script in our repo to run fmt...

CI uses this: https://github.com/tokio-rs/tokio/blob/master/ci/azure-rustfmt.yml#L17

@carllerche
Copy link
Member

carllerche commented Dec 21, 2019

Oh, could you add a test that goes via the Stream impl?

It mostly will be copying an existing test but then explicitly calling StreamExt::next.

@carllerche
Copy link
Member

Great work! Thanks

@carllerche carllerche merged commit a854094 into tokio-rs:master Dec 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants