Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6f19165

Browse files
Merge pull request #568 from stjepang/fix-random
Fix rng use in Stream::merge
2 parents 2ca03ca + 5fba3a0 commit 6f19165

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/stream/stream/merge.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ where
4444

4545
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
4646
let this = self.project();
47-
if utils::random(1) == 1 {
47+
if utils::random(2) == 0 {
4848
poll_next_in_order(this.left, this.right, cx)
4949
} else {
5050
poll_next_in_order(this.right, this.left, cx)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /