-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More edits to the async chapter #4033
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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.
- 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.
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.
Upgrade to Rust 1.81
Use immutable borrow of `TcpStream` when creating `BufReader`
Add `cargo init` usage suggestion to 1.3
Update build instructions: include mdbook plugins
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.
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.
This does *not* yet incorporate any of the relevant feedback from Carol on this, so a couple spots are still pretty messy.
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.
Bonus: fix some style guide issues, too! Co-authored-by: Carol (Nichols || Goulding) <[email protected]> Co-authored-by: James Munns <[email protected]> Co-authored-by: Tim McNamara <[email protected]>
Co-authored-by: James Munns <[email protected]>
Co-authored-by: Tim McNamara <[email protected]> Co-authored-by: Carol (Nichols || Goulding) <[email protected]>
I accidentally copied these in when pulling in the `trpl-note` mdbook preprocessor many months ago, and we did not notice amidst the many other changes in that PR!
@makarichevss thanks, but we are not looking for general public feedback at present. This chapter is still very much a work in progress. |
chriskrycho
force-pushed
the
async-edits
branch
from
September 20, 2024 21:41
5b75c32
to
f7a0a3b
Compare
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!
chriskrycho
force-pushed
the
async-edits
branch
from
September 20, 2024 22:46
f7a0a3b
to
cc5db97
Compare
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.
chriskrycho
force-pushed
the
async-edits
branch
from
September 23, 2024 15:18
5a9b806
to
b265249
Compare
15 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Important
This PR is the home of the next set of edits targeting #3909. It is not really intended for public review, but rather as an easy place for @carols10cents and me to be able to discuss or coordinate if/as makes sense to us. Thanks!
This has nearly all the review comments from #3909 integrated. In particular, beyond clarifications and stylistic improvements based on review comments and my own detailed edit, it also includes:
join
,race
, and so on have been combined. All the original material is still there, just rearranged (and much clarified).As of the time I am actually opening this PR, the remaining tasks are:
I expect to finish those up by midway through next week. 🎉