Skip to content

Commit dae2bb9

Browse files
committed
Removed unnecessary parentheses + fixed test
1 parent 3bbfefe commit dae2bb9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

futures-util/src/stream/stream/flat_map_unordered.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,8 @@ where
347347

348348
if poll_state_value & NEED_TO_POLL != NONE
349349
&& (polling_with_two_wakers
350-
|| (poll_state_value & NEED_TO_POLL_FUTURES != NONE && !futures_will_be_woken
351-
|| poll_state_value & NEED_TO_POLL_STREAM != NONE && !stream_will_be_woken))
350+
|| poll_state_value & NEED_TO_POLL_FUTURES != NONE && !futures_will_be_woken
351+
|| poll_state_value & NEED_TO_POLL_STREAM != NONE && !stream_will_be_woken)
352352
{
353353
ctx.waker().wake_by_ref();
354354
}

futures/tests/stream.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ fn flat_map_unordered() {
4545
.collect::<Vec<_>>()
4646
.await;
4747

48-
assert_eq!(fm_unordered.sort(), vec![0, 2, 4, 6, 8, 10, 0, 2].sort());
48+
fm_unordered.sort();
49+
50+
assert_eq!(fm_unordered, vec![0, 0, 2, 2, 4, 6, 8, 10]);
4951
});
5052
}

0 commit comments

Comments
 (0)