Merge pull request #7 from MarinPostma/typo-future

fix typo in code example
This commit is contained in:
Carl Fredrik Samson
2020-04-11 00:28:49 +02:00
committed by GitHub

View File

@@ -69,10 +69,9 @@ fn block_on<F: Future>(mut future: F) -> F::Output {
// We poll in a loop, but it's not a busy loop. It will only run when
// an event occurs, or a thread has a "spurious wakeup" (an unexpected wakeup
// that can happen for no good reason).
let val = loop {
match Future::poll(pinned, &mut cx) {
let val = loop {
match Future::poll(future, &mut cx) {
// when the Future is ready we're finished
Poll::Ready(val) => break val,