- Introduce diagrams into 17.05 to break up the wall of text and make it
easier to visualize.
- Extract the state machine code to make it easier to reference.
- Standardize on `await` instead of `.await` for inline code references.
- Move note about `race` and `select` up to 17.01 since the text now
references it there, and update the text in 17.03 to account for
already having introduced the function.
- Fix up a number of code samples to avoid showing `extern crate trpl;`.
- Rewrite the transition between 17.04 and 17.05 to account for having
restructured the chapter.
- Rework the example code in 17.05 to refer to the `page_title` example
from the rewritten 17.01 instead of the (now-removed) `hello`.
- When discussing the `Future::poll` method, explicitly address the `cx`
parameter: note what it is used for, and then move on.
This gets CI working again. The problem was basically a mix of a few
silly mistakes:
- Using `include` instead of `rustdoc_include` in several places.
- Having rewritten the listing numbers incorrectly.
Add `reqwest` and `scraper` dependencies to the `trpl` crate. Wrap them
in `trpl` re-exports which keep the API surface low.
Rewrite the whole first section to use `race` along with those `trpl`
re-exports to show a more “real” example of async code right form the
start, including actual concurrency, unlike the previous introduction.
Update 17.03 to account for having introduced `race` already, and update
listing numbers for rewritten 17.01.
The *inclues* for them were fixed already, but not these!
Along with the wording and phrasing-level edits, pull out a fair bit of
material for the “advanced” section at the end, specifically the details
of what `Stream` and `StreamExt` actually do.
These make up *most* of the rest of the edits I caught while rereading
which are not *major structural revisions*, along with some of the bits
required for those major structural revisions.
The `block_on` name is what both Tokio and smol use, but it is a bit
obscure from the point of view of introducing this material. `run` says
much more clearly what it does *for the level we care about here*, I
think.
In addition to the baseline changes, skip over non-directory code where
directories are needed to deal with things like `.DS_Store` files. Also
add a bunch of context on error causes from `std::io::Error` because it
was *impossible* to figure out exactly what the source of those were.
- Create a section (which will be deleted or at least reintegrated once
all is said and done) to hold content pulled out of other sections for
the sake of clearer flow and understanding.
- Pull “advanced” material from 17.00, 17.01, and 17.02 into the holding
section and start reorganizing their content to account for shifting
around materials.
- Set their view boxes to the original height and width, so they are
guaranteed to present correctly.
- For Figure 17-02, use the trick of adding a hidden node and hidden
arrow to it in “Task 2” to align the two boxes.