From 6c0d83499c8e77e06a71d28c5e1adccec278d4f3 Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Sun, 23 Jun 2019 20:25:30 -0400 Subject: [PATCH] fancy quotes --- src/ch04-02-references-and-borrowing.md | 4 ++-- ...referring-to-an-item-in-the-module-tree.md | 6 ++--- src/title-page.md | 24 +++++++++---------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/ch04-02-references-and-borrowing.md b/src/ch04-02-references-and-borrowing.md index b44aad3e50..27290fcf04 100644 --- a/src/ch04-02-references-and-borrowing.md +++ b/src/ch04-02-references-and-borrowing.md @@ -229,7 +229,7 @@ from under them! However, multiple immutable references are okay because no one who is just reading the data has the ability to affect anyone else’s reading of the data. -Note that a reference's scope starts from where it is introduced and continues +Note that a reference’s scope starts from where it is introduced and continues through the last time that reference is used. For instance, this code will compile because the last usage of the immutable references occurs before the mutable reference is introduced: @@ -252,7 +252,7 @@ println!("{}", r3); The scopes of the immutable references `r1` and `r2` end after the `println!` where they are last used, which is before the mutable reference `r3` is -created. These scopes don't overlap, so this code is allowed. +created. These scopes don’t overlap, so this code is allowed. Even though borrowing errors may be frustrating at times, remember that it’s the Rust compiler pointing out a potential bug early (at compile time rather diff --git a/src/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md b/src/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md index 0ae27109cb..8cb0dfadc4 100644 --- a/src/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md +++ b/src/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md @@ -19,9 +19,9 @@ Let’s return to the example in Listing 7-1. How do we call the `add_to_waitlist` function? In Listing 7-3, we simplified our code a bit by removing some of the modules and functions. We’ll show two ways to call the `add_to_waitlist` function from a new function `eat_at_restaurant` defined in -the crate root. The `eat_at_restaurant` function is part of our library crate's -public API, so we mark it with the `pub` keyword. In the ["Exposing Paths with -the `pub` Keyword"][pub] section, we'll go into more detail +the crate root. The `eat_at_restaurant` function is part of our library crate’s +public API, so we mark it with the `pub` keyword. In the [”Exposing Paths with +the `pub` Keyword”][pub] section, we’ll go into more detail about `pub`. Note that this example won’t compile just yet; we’ll explain why in a bit. diff --git a/src/title-page.md b/src/title-page.md index 33703032e3..18a664a6b4 100644 --- a/src/title-page.md +++ b/src/title-page.md @@ -3,7 +3,7 @@ *by Steve Klabnik and Carol Nichols, with contributions from the Rust Community* Welcome to *The Rust Programming Language* book! This version of the text assumes -you're using Rust 1.31.0 or later with `edition="2018"` in *Cargo.toml* of +you’re using Rust 1.31.0 or later with `edition="2018"` in *Cargo.toml* of all projects to use Rust 2018 Edition idioms. See the [“Installation” section of Chapter 1][install] to install or update Rust, and see the new [Appendix E][editions] for information on what editions of @@ -13,28 +13,28 @@ The 2018 Edition of the Rust language includes a number of improvements that make Rust more ergonomic and easier to learn. This printing of the book contains a number of changes to reflect those improvements: -- Chapter 7, "Managing Growing Projects with Packages, Crates, and Modules," +- Chapter 7, “Managing Growing Projects with Packages, Crates, and Modules,” has been mostly rewritten. The module system and the way paths work in the 2018 Edition were made more consistent. -- Chapter 10 has new sections titled "Traits as Parameters" and "Returning - Types that Implement Traits" that explain the new `impl Trait` syntax. -- Chapter 11 has a new section titled "Using `Result` in Tests" that +- Chapter 10 has new sections titled “Traits as Parameters” and “Returning + Types that Implement Traits” that explain the new `impl Trait` syntax. +- Chapter 11 has a new section titled “Using `Result` in Tests” that shows how to write tests that use the `?` operator. -- The "Advanced Lifetimes" section of Chapter 19 was removed because compiler +- The “Advanced Lifetimes” section of Chapter 19 was removed because compiler improvements have made the constructs in that section even rarer. -- The previous Appendix D, "Macros," has been expanded to include procedural - macros and was moved to the "Macros" section in Chapter 19. -- Appendix A, "Keywords," also explains the new raw identifiers feature that +- The previous Appendix D, “Macros,” has been expanded to include procedural + macros and was moved to the “Macros” section in Chapter 19. +- Appendix A, “Keywords,” also explains the new raw identifiers feature that enables code written in the 2015 Edition and the 2018 Edition to interoperate. -- Appendix D is now titled "Useful Development Tools" and covers recently +- Appendix D is now titled “Useful Development Tools” and covers recently released tools that help you write Rust code. - We fixed a number of small errors and imprecise wording throughout the book. Thank you to the readers who reported them! Note that any code in the first printing of *The Rust Programming Language* that compiled will continue to compile without `edition="2018"` 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! +project’s *Cargo.toml*, even as you update the Rust compiler version you’re +using. That’s Rust’s backward compatibility guarantees at work! The HTML format is available online at [https://doc.rust-lang.org/stable/book/](https://doc.rust-lang.org/stable/book/)