2022-07-14 00:57:18 +00:00
|
|
|
|
## Preface
|
2022-07-05 15:46:01 +00:00
|
|
|
|
|
|
|
|
|
This version of the text assumes you’re using Rust 1.62.0 (released 2022-06-30)
|
2022-07-14 00:57:18 +00:00
|
|
|
|
or later with `edition="2021"` in *Cargo.toml* of all projects to use Rust 2021
|
|
|
|
|
Edition idioms. See “Installation” on page 1 for instructions on installing or
|
|
|
|
|
updating Rust, and see Appendix E for information on editions.
|
2022-07-05 15:46:01 +00:00
|
|
|
|
|
2022-07-14 00:57:18 +00:00
|
|
|
|
The 2021 Edition of the Rust language includes a number of improvements that
|
|
|
|
|
make Rust more ergonomic and correct some inconsistencies. On top of a general
|
|
|
|
|
update to reflect these improvements, this rendition of the book has a number
|
|
|
|
|
of improvements to address specific feedback:
|
2022-07-05 15:46:01 +00:00
|
|
|
|
|
2022-07-14 00:57:18 +00:00
|
|
|
|
* Chapter 7 contains a new quick reference section on organizing your code into
|
2022-07-05 15:46:01 +00:00
|
|
|
|
multiple files with modules.
|
2022-07-14 00:57:18 +00:00
|
|
|
|
* Chapter 13 has new and improved closure examples that more clearly illustrate
|
2022-07-05 15:46:01 +00:00
|
|
|
|
captures, the `move` keyword, and the `Fn` traits.
|
2022-07-14 00:57:18 +00:00
|
|
|
|
* We fixed a number of small errors and imprecise wording throughout the book.
|
2022-07-05 15:46:01 +00:00
|
|
|
|
Thank you to the readers who reported them!
|
2022-07-14 00:57:18 +00:00
|
|
|
|
Note that any code from earlier renditions of this book that compiled will
|
2022-07-05 15:46:01 +00:00
|
|
|
|
continue to compile with the relevant edition in the project’s *Cargo.toml*,
|
|
|
|
|
even as you update the Rust compiler version you’re using. That’s Rust’s
|
|
|
|
|
backward compatibility guarantees at work!
|