Skip to content

Commit

Permalink
Merge pull request rust-lang#86 from nelsonjchen/patch-1
Browse files Browse the repository at this point in the history
Correct link to Hello World loop's run() in TUTORIAL.md
  • Loading branch information
alexcrichton authored Aug 21, 2016
2 parents 370126c + d778acf commit 761fd93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TUTORIAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,11 @@ println!("{}", String::from_utf8_lossy(&data));
```

Here we pass our `response` future, our entire HTTP request, and we pass it to
the event loop, [asking it to resolve the future][`run`]. The event loop will
the event loop, [asking it to resolve the future][`loop_run`]. The event loop will
then run until the future has been resolved, returning the result of the future
which in this case is `io::Result<Vec<u8>>`.

[`run`]: http://alexcrichton.com/futures-rs/futures_mio/struct.Loop.html#method.run
[`loop_run`]: http://alexcrichton.com/futures-rs/futures_mio/struct.Loop.html#method.run

Note that this `lp.run(..)` call will block the calling thread until the future
can itself be resolved. This means that `data` here has type `Vec<u8>`. We then
Expand Down

0 comments on commit 761fd93

Please sign in to comment.