Skip to content

Fix rng use in Stream::merge #568

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 Nov 20, 2019
Merged

Fix rng use in Stream::merge #568

merged 1 commit into from Nov 20, 2019

Conversation

ghost
Copy link

@ghost ghost commented Nov 20, 2019

random(n) generates a random number in 0..n, which means random(1) always returns 0. :)

This PR changes random(1) to random(2).

@yoshuawuyts yoshuawuyts merged commit 6f19165 into async-rs:master Nov 20, 2019
@yoshuawuyts
Copy link
Contributor

yoshuawuyts commented Nov 20, 2019

dang, I should've caught that. Oops, sorry and thanks for fixing!

@ghost ghost deleted the fix-random branch November 20, 2019 13:15
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.

3 participants