Coroutines, Self-Referential Structs, and Pinning 222 } Poll State::Not Ready => break Poll State::Not Ready, } } Since there are no more wait points in our program, the rest of the code goes into this segment and since we're done with counter at this point, we can simply drop it by letting it go out of scope. If our variable held onto any resources, they would be released here as well. With that, we've given our coroutines the power of saving variables across wait points. Let's try to run it by writing cargo run. Y ou should see the following output (I've removed the parts of the output that remain unchanged):... Hello Async Await Received 2 responses. main: All tasks are finished Okay, so our program works and does what's expected. Great! Now, let's take a look at an example that needs to store references across wait points since that's an important aspect of having our coroutine/wait functions behave like “normal” functions. Improving our example 2-references Let's set everything up for our next version of this example: Create a new folder called b-coroutines-references and copy everything from a-coroutines-variables over to it Y ou can change the name of the project so that it corresponds with the folder by changing the name attribute in the package section in Cargo. toml, but it's not something you need to do for the example to work Note Y ou can find this example in this book's Git Hub repository in the ch10/b-coroutines-references folder. This time, we'll learn how to store references to variables in our coroutines by using the following coroutine/wait example program: use std::fmt::Write; coroutine fn async_main() { let mut buffer = String::from( "\n BUFFER:\n----\n ");