From 76df60bccead5f3de96db23d97b69597cd8a2b82 Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Sun, 24 Feb 2019 11:57:29 -0500 Subject: [PATCH] fancy quotes --- src/appendix-01-keywords.md | 4 ++-- src/ch01-02-hello-world.md | 2 +- src/ch02-00-guessing-game-tutorial.md | 2 +- src/ch07-01-packages-and-crates.md | 4 ++-- src/ch08-01-vectors.md | 2 +- src/ch09-03-to-panic-or-not-to-panic.md | 2 +- src/ch12-02-reading-a-file.md | 2 +- src/ch12-03-improving-error-handling-and-modularity.md | 2 +- src/ch15-02-deref.md | 2 +- src/title-page.md | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/appendix-01-keywords.md b/src/appendix-01-keywords.md index 51db85d9e..770e4dffd 100644 --- a/src/appendix-01-keywords.md +++ b/src/appendix-01-keywords.md @@ -2,7 +2,7 @@ The following list contains keywords that are reserved for current or future use by the Rust language. As such, they cannot be used as identifiers (except -as raw identifiers as we'll discuss in the "[Raw Identifiers][raw-identifiers]" +as raw identifiers as we’ll discuss in the “[Raw Identifiers][raw-identifiers]” section), including names of functions, variables, parameters, struct fields, modules, crates, constants, macros, static values, attributes, types, traits, or lifetimes. @@ -98,7 +98,7 @@ error: expected identifier, found keyword `match` | ^^^^^ expected identifier, found keyword ``` -The error says that you can't use the keyword `match` as the function +The error says that you can’t use the keyword `match` as the function identifier. You can use `match` as a function name by using a raw identifier: Filename: src/main.rs diff --git a/src/ch01-02-hello-world.md b/src/ch01-02-hello-world.md index e6877381d..e82ba4967 100644 --- a/src/ch01-02-hello-world.md +++ b/src/ch01-02-hello-world.md @@ -151,7 +151,7 @@ If you have a C or C++ background, you’ll notice that this is similar to `gcc` or `clang`. After compiling successfully, Rust outputs a binary executable. On Linux, macOS, and PowerShell on Windows, you can see the executable by -entering the `ls` command in your shell. On Linux and macOS, you'll see two +entering the `ls` command in your shell. On Linux and macOS, you’ll see two files. With PowerShell on Windows, you’ll see the same three files that you would see using CMD. diff --git a/src/ch02-00-guessing-game-tutorial.md b/src/ch02-00-guessing-game-tutorial.md index ef963df65..7ac6d3da8 100644 --- a/src/ch02-00-guessing-game-tutorial.md +++ b/src/ch02-00-guessing-game-tutorial.md @@ -171,7 +171,7 @@ let mut bar = 5; // mutable > line. Rust ignores everything in comments, which are discussed in more detail > in Chapter 3. -Let's return to the guessing game program. You now know that `let mut guess` +Let’s return to the guessing game program. You now know that `let mut guess` will introduce a mutable variable named `guess`. On the other side of the equal sign (`=`) is the value that `guess` is bound to, which is the result of calling `String::new`, a function that returns a new instance of a `String`. diff --git a/src/ch07-01-packages-and-crates.md b/src/ch07-01-packages-and-crates.md index 83428f2a6..60bb381de 100644 --- a/src/ch07-01-packages-and-crates.md +++ b/src/ch07-01-packages-and-crates.md @@ -3,8 +3,8 @@ The first parts of the module system we’ll cover are *packages* and *crates*. A *crate* is a binary or library. The *crate root* is a source file that the Rust compiler starts from and makes up the root module of your crate (we’ll explain -modules in depth in the section ["Defining Modules to Control Scope and -Privacy"][modules]). A *package* is one or more crates that +modules in depth in the section [“Defining Modules to Control Scope and +Privacy”][modules]). A *package* is one or more crates that provide a set of functionality. A package contains a *Cargo.toml* file that describes how to build those crates. diff --git a/src/ch08-01-vectors.md b/src/ch08-01-vectors.md index a38d157e8..aaf15381f 100644 --- a/src/ch08-01-vectors.md +++ b/src/ch08-01-vectors.md @@ -234,7 +234,7 @@ elements in a vector To change the value that the mutable reference refers to, we have to use the dereference operator (`*`) to get to the value in `i` before we can use the `+=` operator. We’ll talk more about the dereference operator in the -["Following the Pointer to the Value with the Dereference Operator"][deref] +[“Following the Pointer to the Value with the Dereference Operator”][deref] section of Chapter 15. ### Using an Enum to Store Multiple Types diff --git a/src/ch09-03-to-panic-or-not-to-panic.md b/src/ch09-03-to-panic-or-not-to-panic.md index 5d8878be8..a8f6965b1 100644 --- a/src/ch09-03-to-panic-or-not-to-panic.md +++ b/src/ch09-03-to-panic-or-not-to-panic.md @@ -81,7 +81,7 @@ bug in their code so they can fix it during development. Similarly, `panic!` is often appropriate if you’re calling external code that is out of your control and it returns an invalid state that you have no way of fixing. -However, when failure is expected, it's more appropriate to return a `Result` +However, when failure is expected, it’s more appropriate to return a `Result` than to make a `panic!` call. Examples include a parser being given malformed data or an HTTP request returning a status that indicates you have hit a rate limit. In these cases, returning a `Result` indicates that failure is an diff --git a/src/ch12-02-reading-a-file.md b/src/ch12-02-reading-a-file.md index 107e7fdd0..8c4c92ec8 100644 --- a/src/ch12-02-reading-a-file.md +++ b/src/ch12-02-reading-a-file.md @@ -58,7 +58,7 @@ First, we add another `use` statement to bring in a relevant part of the standard library: we need `std::fs` to handle files. In `main`, we’ve added a new statement: `fs::read_to_string` takes the -`filename`, opens that file, and returns a `Result` of the file's +`filename`, opens that file, and returns a `Result` of the file’s contents. After that statement, we’ve again added a temporary `println!` statement that diff --git a/src/ch12-03-improving-error-handling-and-modularity.md b/src/ch12-03-improving-error-handling-and-modularity.md index 6090454f6..005a1437c 100644 --- a/src/ch12-03-improving-error-handling-and-modularity.md +++ b/src/ch12-03-improving-error-handling-and-modularity.md @@ -657,7 +657,7 @@ fn main() { *src/main.rs* We add a `use minigrep::Config` line to bring the `Config` type from the -library crate into the binary crate's scope, and we prefix the `run` function +library crate into the binary crate’s scope, and we prefix the `run` function with our crate name. Now all the functionality should be connected and should work. Run the program with `cargo run` and make sure everything works correctly. diff --git a/src/ch15-02-deref.md b/src/ch15-02-deref.md index 24cd62ab0..6520eaf96 100644 --- a/src/ch15-02-deref.md +++ b/src/ch15-02-deref.md @@ -14,7 +14,7 @@ smart pointers to work in a similar way as references. Then we’ll look at Rust’s *deref coercion* feature and how it lets us work with either references or smart pointers. -> Note: there's one big difference between the `MyBox` type we're about to +> Note: there’s one big difference between the `MyBox` type we’re about to > build and the real `Box`: our version will not store its data on the heap. > We are focusing this example on `Deref`, so where the data is actually stored > is less important than the pointer-like behavior. diff --git a/src/title-page.md b/src/title-page.md index 06a297b4d..aaf7a1524 100644 --- a/src/title-page.md +++ b/src/title-page.md @@ -2,7 +2,7 @@ Welcome to The Rust Programming Language book! This version of the text assumes you are 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 +all projects to use Rust 2018 Edition idioms. See the [“Installation” section of Chapter 1][install] to install or update Rust, and see [Appendix E][editions] for information on what editions of Rust are.