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

@@ -70,8 +70,7 @@ fn block_on<F: Future>(mut future: F) -> F::Output {
// an event occurs, or a thread has a "spurious wakeup" (an unexpected wakeup // an event occurs, or a thread has a "spurious wakeup" (an unexpected wakeup
// that can happen for no good reason). // that can happen for no good reason).
let val = loop { let val = loop {
match Future::poll(future, &mut cx) {
match Future::poll(pinned, &mut cx) {
// when the Future is ready we're finished // when the Future is ready we're finished
Poll::Ready(val) => break val, Poll::Ready(val) => break val,