Commit Graph
6020 Commits
Author SHA1 Message Date
Chris Krycho ac911c4223 Merge pull request #4280 from rust-lang/fixes-counting-line-simplify
Ferris: always show, even when it’s small
2025-03-17 11:50:24 -06:00
Chris Krycho 8372e56d40 Ferris: always show Ferrises, even if small
Previously, when we incorporated Ferris into the container for the
buttons, we were bringing along the visibility of the buttons even when
it was important to know that the code wouldn’t compile. This changes
that by showing and hiding the buttons themselves rather than their
container.

Fixes #4274
2025-03-17 11:42:44 -06:00
Chris Krycho 9847e79350 Ferris: simplify line counting for size determination
This is a trivial thing, but I found the previous “replace a terminal
newline and then count the rest” rather less than obvious. Make the
logic more explicit and, as a fun bonus, skip allocating an extra string
along the way. (Not that it matters, in this case, but it’s always
nice to make that kind of improvement.)
2025-03-17 11:41:09 -06:00
Chris Krycho fb2d874349 Merge pull request #4279 from rust-lang/mention-std-pin-use
Ch. 17: mention `use std::pin::{Pin, pin};` on introduction
2025-03-17 10:30:29 -06:00
Chris Krycho b021b72eef Ch. 17: mention use std::pin::{Pin, pin}; on introduction
Bonus: drop now-unnecessary `use std::future::Future` bits given it is
now part of the prelude as of the 2024 edition!

Fixes #4275
2025-03-17 10:26:14 -06:00
Chris Krycho 5a762c3516 Merge pull request #4259 from distortedsignal/wildcard_match_file_fail
Persist printing error, NOT ErrorKind
2025-03-17 09:42:46 -06:00
Chris Krycho 90ea905177 Merge pull request #4263 from proski/two-seconds
Typo: "2" should be "2 seconds"
2025-03-13 10:16:02 -06:00
Chris Krycho a59a0229cf Merge pull request #4270 from alannza/main
Ch. 17: fix tiny example consistency issue
2025-03-13 10:07:49 -06:00
Chris Krycho b456af6342 Merge pull request #4261 from rust-lang/dependabot/cargo/listings/ch17-async-await/listing-17-02/ring-0.17.13
Bump ring from 0.17.8 to 0.17.13 in /listings/ch17-async-await/listing-17-02
2025-03-13 08:43:45 -06:00
Chris Krycho 548187272c Merge pull request #4273 from rust-lang/dependabot/cargo/packages/trpl/ring-0.17.14
Bump ring from 0.17.8 to 0.17.14 in /packages/trpl
2025-03-13 08:43:29 -06:00
dependabot[bot] c47894697c Bump ring from 0.17.8 to 0.17.14 in /packages/trpl
Bumps [ring](https://github.com/briansmith/ring) from 0.17.8 to 0.17.14.
- [Changelog](https://github.com/briansmith/ring/blob/main/RELEASES.md)
- [Commits](https://github.com/briansmith/ring/commits)

---
updated-dependencies:
- dependency-name: ring
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-13 14:15:56 +00:00
Chris Krycho 70c566fd15 Merge pull request #4272 from rust-lang/nostarch-backports
2024 Print Edition: updates to Word docs and more fixes to Markdown text
2025-03-13 08:14:37 -06:00
Chris Krycho 32494841d6 link2print: *which* reference is repeatedly defined? 2025-03-13 08:11:51 -06:00
Chris Krycho 56ec353290 More changes caught during ↔ backports for print edition 2025-03-13 08:11:51 -06:00
Chris Krycho 02e053cdbb nostarch: update Word documents with revisions from web version 2025-03-12 17:24:28 -06:00
Alan 54245bf9ef Ch. 17: fix tiny example consistency issue 2025-03-11 19:16:00 -07:00
Pavel Roskin c6f57828d7 Typo: "2" should be "2 seconds"
Remove extraneous "also" in the same paragraph.
2025-03-07 23:08:38 -08:00
dependabot[bot] 3303dafa07 Bump ring in /listings/ch17-async-await/listing-17-02
Bumps [ring](https://github.com/briansmith/ring) from 0.17.8 to 0.17.13.
- [Changelog](https://github.com/briansmith/ring/blob/main/RELEASES.md)
- [Commits](https://github.com/briansmith/ring/commits)

---
updated-dependencies:
- dependency-name: ring
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-07 17:09:22 +00:00
Tom e3c9cf9164 Persist printing error, NOT ErrorKind
Reading through the Rust Book, I found this code that appears to be
trying to take different actions based on the error type. Looking
closer, I realized that the author changed the code (I believe,
unintentionally) to log only the error type instead of the whole
error when certain conditions are met.

This is a simple fix - the wildcard match for `other_error` is
removed, and replaced with a non-binding wildcard, and the panic
is changed to consuming the base error. This is better because it
changes the minimal amount of functionality in the example code
and it refamiliarizes readers with the wildcard matching system.
2025-03-04 14:06:58 -08:00
Chris Krycho 87f3d05ddf nostarch: incorporate latest revisions from web 2025-02-27 15:10:59 -07:00
Chris Krycho 81a976a237 Merge pull request #4249 from rust-lang/social-media-discussion-generic
Ch. 10: Make social media discussion generic.
2025-02-27 15:10:41 -07:00
Chris Krycho e5c8a0c99d Ch. 10: Make social media discussion generic.
Twitter is now X, who knows what 'tweets' are called, and whether *any*
of the current crop of social media platforms will exist by the time the
2027 or 2030 editions of Rust roll around, who knows?
2025-02-27 15:06:51 -07:00
Chris Krycho 0896670829 Merge pull request #4247 from rust-lang/ch-fix-another-chapter-eighteen
Another Ch. 17 -> 18 fix
2025-02-26 13:31:54 -07:00
Chris Krycho 6b65e95005 Another Ch. 17 -> 18 fix 2025-02-26 13:20:28 -07:00
Chris Krycho 814c7e5cf0 Merge pull request #4246 from rust-lang/ch-improve-wording-about-useravailb
Ch. 05: further tweak to wording about `user1` availability
2025-02-26 13:00:49 -07:00
Chris Krycho 063b1f8aff Ch. 05: further tweak to wording about user1 availability
This is a tricky thing to get “just right”, and I am not *totally* happy
with this solution, but I think it’s actually better without the “as a
whole” given the addition of the sentence at the end indicating that its
fields can still be accessed.
2025-02-26 12:52:43 -07:00
Chris Krycho 5fe7297b27 Merge pull request #4245 from rust-lang/fix-rand-version-mistake
Ch. 02: Fix rand version mistake (from testing)
2025-02-25 17:10:54 -07:00
Chris Krycho 3297509511 Ch. 02: Fix rand version mistake (from testing) 2025-02-25 17:06:07 -07:00
Chris Krycho 8f67810d97 Merge pull request #4244 from rust-lang/closures-and-fn-type
Ch. 19: Correct the discussion of `fn` type and closures
2025-02-25 15:57:13 -07:00
Chris Krycho 0ca2482a69 Ch. 19: Correct the discussion of fn type and closures 2025-02-25 15:50:33 -07:00
Chris Krycho 6bb2d00cea Merge pull request #4243 from rust-lang/edition-scripting
Edition maintenance: scripting the updates for future work
2025-02-25 11:45:41 -07:00
Chris Krycho 34820ac2f4 Edition maintenance: scripting the updates for future work 2025-02-25 11:40:19 -07:00
Chris Krycho 34cdd411ea Merge pull request #4242 from rust-lang/fresh-eyes-edits
Ch. 17: fresh-eyes edits
2025-02-25 10:20:45 -07:00
Chris Krycho 2800281fc4 Ch. 17: fresh-eyes edits
Or: what happens when you reread your own work after a couple months
away from it!
2025-02-25 10:10:33 -07:00
Chris Krycho 0133087d4a Merge pull request #4212 from rust-lang/drop-lifetime-unnecessar-in-edition
Ch. 17: drop lifetime not required in 2024 Edition
2025-02-25 10:03:56 -07:00
Chris Krycho 6ae5d86ca2 Ch. 17: drop lifetime not required in 2024 Edition
This makes for a nicely simpler introduction of this feature!
2025-02-25 09:27:14 -07:00
Chris Krycho ca030ddb09 Merge pull request #4240 from kpreid/patch-1
Appendix B, Operators: Replace “member access” with “field access” and “method call”.
2025-02-25 09:26:41 -07:00
Chris Krycho c7edf19e58 Merge pull request #4241 from rust-lang/2024-edition
Update to Rust 1.85 and 2024 Edition!
2025-02-25 09:26:10 -07:00
Chris Krycho 0833386eab Appendix B: restructure handling of . and parens
In Table B-8, instead of treating “tuples” as the primary concern, treat
parentheses as primary and tuples as one of the contexts. Move the tuple
index access to live alongside field and method access.
2025-02-25 09:10:29 -07:00
Chris Krycho b8b94b3d93 Rust 1.85/2024 Edition: update all edition references 2025-02-25 09:02:49 -07:00
Chris Krycho dac5234891 Rust 1.85/2024 Edition: manual regeneration changes 2025-02-25 07:50:55 -07:00
Chris Krycho 080147a27d Update to Rust 1.85 and 2024 Edition! 2025-02-24 13:55:20 -07:00
Chris Krycho 4958a5dbbc Merge pull request #4239 from rust-lang/fix-spacing-in-chapter-one
Chapter 1: fix 'four things' now that spacing is not emphasized
2025-02-24 11:36:27 -07:00
Kevin Reid 69980b8e85 Replace “member access” with “field access” and “method call”.
Rust doesn’t have a single “member access” operator, but two different operators both using the dot.
2025-02-24 10:03:46 -08:00
Chris Krycho e476d7b6fa Chapter 1: fix 'four things' now that spacing is not emphasized 2025-02-24 08:51:18 -07:00
Chris Krycho 4a01a91824 Merge pull request #4238 from ormai/main
Fix typos in chapter 17
2025-02-24 07:48:34 -07:00
Mario D'Andrea ba1646de18 Ch. 17: Fix typos 2025-02-23 15:58:40 +01:00
Chris Krycho 18f6e63e91 Merge pull request #4224 from rust-lang/nostarch-backports
NoStarch backports
2025-02-13 12:29:47 -07:00
Chris Krycho 5d22a358fb Backport fixes from NoStarch
This is an exhaustive pass in preparation for going the *other* way for
the 2024 Edition print update, i.e. the Third Edition of the print book.
2025-02-13 12:25:25 -07:00
Chris Krycho d4d2c18cbd Merge pull request #4226 from GoldsteinE/fix/rustfix-example
Fix example for `cargo fix`
2025-02-12 09:22:54 -07:00