fix typo in code example
This commit is contained in:
@@ -71,7 +71,7 @@ fn block_on<F: Future>(mut future: F) -> F::Output {
|
|||||||
// that can happen for no good reason).
|
// that can happen for no good reason).
|
||||||
let val = loop {
|
let val = loop {
|
||||||
|
|
||||||
match Future::poll(pinned, &mut cx) {
|
match Future::poll(future, &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,
|
||||||
@@ -710,4 +710,4 @@ Don't forget the exercises in the last chapter 😊.
|
|||||||
[playground_example]:https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=ca43dba55c6e3838c5494de45875677f
|
[playground_example]:https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=ca43dba55c6e3838c5494de45875677f
|
||||||
[spurious_wakeup]: https://cfsamson.github.io/book-exploring-async-basics/9_3_http_module.html#bonus-section
|
[spurious_wakeup]: https://cfsamson.github.io/book-exploring-async-basics/9_3_http_module.html#bonus-section
|
||||||
[condvar]: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html
|
[condvar]: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html
|
||||||
[crossbeam_parker]: https://docs.rs/crossbeam/0.7.3/crossbeam/sync/struct.Parker.html
|
[crossbeam_parker]: https://docs.rs/crossbeam/0.7.3/crossbeam/sync/struct.Parker.html
|
||||||
|
|||||||
Reference in New Issue
Block a user