From 5fba3a09289ffd043e37b38622b1e3cc25a5125e Mon Sep 17 00:00:00 2001 From: Stjepan Glavina Date: Wed, 20 Nov 2019 13:22:46 +0100 Subject: [PATCH] Fix rng use in Stream::merge --- src/stream/stream/merge.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stream/stream/merge.rs b/src/stream/stream/merge.rs index d9d2b0a..84ac432 100644 --- a/src/stream/stream/merge.rs +++ b/src/stream/stream/merge.rs @@ -44,7 +44,7 @@ where fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { let this = self.project(); - if utils::random(1) == 1 { + if utils::random(2) == 0 { poll_next_in_order(this.left, this.right, cx) } else { poll_next_in_order(this.right, this.left, cx)