From 4ea0417d0339f137f9c56703b3c8442347f0f70a Mon Sep 17 00:00:00 2001 From: mike stedman Date: Fri, 21 Oct 2016 19:53:29 -0600 Subject: [PATCH] Some fixes --- src/ch05-00-structs.md | 4 ++-- src/ch06-01-option.md | 2 +- src/ch08-03-hash-maps.md | 2 +- src/chYY-YY-workspaces.md | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ch05-00-structs.md b/src/ch05-00-structs.md index ec11439..7601d04 100644 --- a/src/ch05-00-structs.md +++ b/src/ch05-00-structs.md @@ -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 diff --git a/src/ch06-01-option.md b/src/ch06-01-option.md index 357f5dd..47d1a97 100644 --- a/src/ch06-01-option.md +++ b/src/ch06-01-option.md @@ -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 diff --git a/src/ch08-03-hash-maps.md b/src/ch08-03-hash-maps.md index 2eabef2..aef293c 100644 --- a/src/ch08-03-hash-maps.md +++ b/src/ch08-03-hash-maps.md @@ -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. diff --git a/src/chYY-YY-workspaces.md b/src/chYY-YY-workspaces.md index 3e1ea49..9e595b0 100644 --- a/src/chYY-YY-workspaces.md +++ b/src/chYY-YY-workspaces.md @@ -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*