Skip to content

Commit dd86ee1

Browse files
taiki-ejonhoo
andcommitted
Apply suggestions from code review
Co-authored-by: Jon Gjengset <jon@thesquareplanet.com>
1 parent d4eebb4 commit dd86ee1

File tree

1 file changed

+3
-3
lines changed
  • futures-util/src/stream/futures_unordered

1 file changed

+3
-3
lines changed

futures-util/src/stream/futures_unordered/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ impl<Fut: Future> Stream for FuturesUnordered<Fut> {
501501
// deallocating the task if need be.
502502
let res = {
503503
let task = bomb.task.as_ref().unwrap();
504-
// We are only interested in whether the future waken before it
504+
// We are only interested in whether the future is awoken before it
505505
// finishes polling, so reset the flag here.
506506
task.woken.store(false, Relaxed);
507507
let waker = Task::waker_ref(task);
@@ -517,8 +517,8 @@ impl<Fut: Future> Stream for FuturesUnordered<Fut> {
517517
match res {
518518
Poll::Pending => {
519519
let task = bomb.task.take().unwrap();
520-
// If the future waken before it finishes polling, we assume
521-
// the future yields.
520+
// If the future was awoken during polling, we assume
521+
// the future wanted to explicitly yield.
522522
let yielded = task.woken.load(Relaxed);
523523
bomb.queue.link(task);
524524

0 commit comments

Comments
 (0)