Skip to content

Commit 3c874f6

Browse files
Update lib.rs
Add a comment to highlight the code flow. I was a bit stuck on this example and thought it had an error. However, when I found the `return` keyword, I understood the true flow. I would like to add this comment to make the flow of reading smoother.
1 parent ed022fc commit 3c874f6

File tree

1 file changed

+1
-0
lines changed
  • examples/02_02_future_trait/src

1 file changed

+1
-0
lines changed

examples/02_02_future_trait/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ where
125125
// the second!
126126
Poll::Ready(()) => self.first.take(),
127127
// We couldn't yet complete the first future.
128+
// Notice that we disrupt the flow of the `pool` function with the `return` statement.
128129
Poll::Pending => return Poll::Pending,
129130
};
130131
}

0 commit comments

Comments
 (0)