diff --git a/src/appendix-02-operators.md b/src/appendix-02-operators.md index bc770c703e..0a8dab9d61 100644 --- a/src/appendix-02-operators.md +++ b/src/appendix-02-operators.md @@ -103,7 +103,7 @@ hierarchy to an item. |--------|-------------| | `ident::ident` | Namespace path | | `::path` | Path relative to the crate root (i.e., an explicitly absolute path) | -| `self::path` | Path relative to the current module (i.e., an explicitly relative path). +| `self::path` | Path relative to the current module (i.e., an explicitly relative path). | | `super::path` | Path relative to the parent of the current module | | `type::ident`, `::ident` | Associated constants, functions, and types | | `::...` | Associated item for a type that cannot be directly named (e.g., `<&T>::...`, `<[T]>::...`, etc.) | diff --git a/src/ch03-05-control-flow.md b/src/ch03-05-control-flow.md index 60d6b95a96..34b8372f34 100644 --- a/src/ch03-05-control-flow.md +++ b/src/ch03-05-control-flow.md @@ -297,7 +297,7 @@ evaluates to `true`, the code runs; otherwise, it exits the loop. #### Looping Through a Collection with `for` -You can choose to use the `while` construct to loop over the elements of a +You can also use the `while` construct to loop over the elements of a collection, such as an array. For example, the loop in Listing 3-4 prints each element in the array `a`. 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 e2e627eb75..85fc247376 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 @@ -184,7 +184,7 @@ interested in this topic, see [The Rust API Guidelines][api-guidelines]. > well as a *src/lib.rs* library crate root, and both crates will have the > package name by default. Typically, packages with this pattern of containing > both a library and a binary crate will have just enough code in the binary -> crate to start an executable that calls code with the library crate. This +> crate to start an executable that calls code within the library crate. This > lets other projects benefit from most of the functionality that the package > provides, because the library crate’s code can be shared. > diff --git a/src/ch11-01-writing-tests.md b/src/ch11-01-writing-tests.md index df09aadc84..7c36f729eb 100644 --- a/src/ch11-01-writing-tests.md +++ b/src/ch11-01-writing-tests.md @@ -309,7 +309,7 @@ Run the tests again: ``` Our test caught the bug! The `it_adds_two` test failed, and the message tells -us that the assertion that fails was `` assertion failed: `(left == right)` `` +us that the assertion that fails was ``assertion `left == right` failed`` and what the `left` and `right` values are. This message helps us start debugging: the `left` argument was `4` but the `right` argument, where we had `add_two(2)`, was `5`. You can imagine that this would be especially helpful