From 3c874f694dde73433051c138c14bc1b4c653007d Mon Sep 17 00:00:00 2001 From: Denys Bushulyak Date: Fri, 15 Mar 2024 23:48:38 +0300 Subject: [PATCH] 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. --- examples/02_02_future_trait/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/02_02_future_trait/src/lib.rs b/examples/02_02_future_trait/src/lib.rs index 0d3d799e..e696703e 100644 --- a/examples/02_02_future_trait/src/lib.rs +++ b/examples/02_02_future_trait/src/lib.rs @@ -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, }; }