Merge remote-tracking branch 'origin/pr/311'

This commit is contained in:
Carol (Nichols || Goulding) 2016-11-02 13:17:53 -04:00
commit 8614de393b
4 changed files with 6 additions and 6 deletions

View File

@ -10,8 +10,8 @@ Chapter 6) concepts are the building blocks for creating new types in your
program's domain in order to take full advantage of Rust's compile-time type
checking.
One way of thinking about structs is that they are similar to tuples that we
talked about in Chapter 3. Like tuples, the pieces of a struct can be different
One way of thinking about structs is that they are similar to tuples, which we
talked about in Chapter 3. Like tuples, the pieces of a struct can be of different
types. Unlike tuples, we name each piece of data so that it's clearer what the
values mean. Structs are more flexible as a result of these names: we don't
have to rely on the order of the data to specify or access the values of an

View File

@ -1,6 +1,6 @@
## The `Option` Enum and its Advantages Over Null Values
In the previous section, we looked at how the `IpAddr` enum lets us use Rust's
In the previous section, we looked at how the `IpAddr` enum let us use Rust's
type system to encode more information than just the data into our program.
This section is a case study of `Option`, which is another enum defined by the
standard library. The `Option` type is used in many places because it encodes

View File

@ -195,7 +195,7 @@ already has the value "hello".
#### Update a Value Based on the Old Value
Another common use case for hash maps is to look up a key's value then update
Another common use case for hash maps is to look up a key's value and then update
it, using the old value. For instance, if we wanted to count how many times
each word appeared in some text, we could use a hash map with the words as keys
and increment the value to keep track of how many times we've seen that word.

View File

@ -1,7 +1,7 @@
## Workspaces and Multiple Related Crates
Projects can define a workspace which is a set of crates that will all share
the same Cargo.lock and output directory.
Projects can define a workspace, which is a set of crates that will all share
the same `Cargo.lock` and output directory.
We weren't technically precise about the difference between a *package* and a
*crate* until now, and casually people will use the words *package* and *crate*