fancy quotes

This commit is contained in:
Carol (Nichols || Goulding)
2019-02-24 11:57:29 -05:00
parent 6cd30387f6
commit 76df60bcce
10 changed files with 12 additions and 12 deletions

View File

@@ -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 well 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 cant use the keyword `match` as the function
identifier. You can use `match` as a function name by using a raw identifier:
<span class="filename">Filename: src/main.rs</span>

View File

@@ -151,7 +151,7 @@ If you have a C or C++ background, youll 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, youll see two
files. With PowerShell on Windows, youll see the same three files that you
would see using CMD.

View File

@@ -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`
Lets 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`.

View File

@@ -3,8 +3,8 @@
The first parts of the module system well 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 (well explain
modules in depth in the section ["Defining Modules to Control Scope and
Privacy"][modules]<!-- ignore -->). A *package* is one or more crates that
modules in depth in the section [Defining Modules to Control Scope and
Privacy][modules]<!-- ignore -->). 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.

View File

@@ -234,7 +234,7 @@ elements in a vector</span>
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. Well 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

View File

@@ -81,7 +81,7 @@ bug in their code so they can fix it during development. Similarly, `panic!` is
often appropriate if youre 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, its 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

View File

@@ -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`, weve added a new statement: `fs::read_to_string` takes the
`filename`, opens that file, and returns a `Result<String>` of the file's
`filename`, opens that file, and returns a `Result<String>` of the files
contents.
After that statement, weve again added a temporary `println!` statement that

View File

@@ -657,7 +657,7 @@ fn main() {
*src/main.rs*</span>
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 crates 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.

View File

@@ -14,7 +14,7 @@ smart pointers to work in a similar way as references. Then well look at
Rusts *deref coercion* feature and how it lets us work with either references
or smart pointers.
> Note: there's one big difference between the `MyBox<T>` type we're about to
> Note: theres one big difference between the `MyBox<T>` type were about to
> build and the real `Box<T>`: 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.

View File

@@ -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]<!-- ignore --> to install or update Rust, and see
[Appendix E][editions]<!-- ignore --> for information on what editions of Rust
are.