Skip to content

Commit

Permalink
Update lib.rs
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Denys-Bushulyak authored Mar 15, 2024
1 parent ed022fc commit 3c874f6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/02_02_future_trait/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ where
// the second!
Poll::Ready(()) => self.first.take(),
// We couldn't yet complete the first future.
// Notice that we disrupt the flow of the `pool` function with the `return` statement.
Poll::Pending => return Poll::Pending,
};
}
Expand Down

0 comments on commit 3c874f6

Please sign in to comment.