From 08d3496982aaa197b8db8bc885f9cd82d87a6747 Mon Sep 17 00:00:00 2001 From: Matt Nield <64328730+matthewjnield@users.noreply.github.com> Date: Sun, 8 Oct 2023 01:52:28 -0400 Subject: [PATCH 1/6] Fix typo in Chapter 7 Section 3 Fix typo in Chapter 7 Section 3, changing "benefit from the most functionality" to "benefit from most of the functionality" --- ...ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 c8fb3247ff..e2e627eb75 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 @@ -185,7 +185,7 @@ interested in this topic, see [The Rust API Guidelines][api-guidelines]. > 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 -> lets other projects benefit from the most functionality that the package +> lets other projects benefit from most of the functionality that the package > provides, because the library crate’s code can be shared. > > The module tree should be defined in *src/lib.rs*. Then, any public items can From 1402554da88bfaf3fe1cc33d18a5974286287408 Mon Sep 17 00:00:00 2001 From: Matt Nield <64328730+matthewjnield@users.noreply.github.com> Date: Sun, 8 Oct 2023 02:02:46 -0400 Subject: [PATCH 2/6] Fix typo in Chapter 7 Section 3 Fix typo in Chapter 7 Section 3, changing "start an executable that calls code with the library crate." to "start an executable that calls code within the library crate." --- ...ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. > From 187b317e891a4eedfd8f1e16c773e7520e1850f2 Mon Sep 17 00:00:00 2001 From: Rafael Kraut <14234815+RafaelKr@users.noreply.github.com> Date: Fri, 27 Oct 2023 14:30:26 +0200 Subject: [PATCH 3/6] Improve ch03-05-control-flow collection looping wording This makes it clearer, that you COULD use a `while` loop to loop a collection, but a `for` loop is the preferred way --- src/ch03-05-control-flow.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch03-05-control-flow.md b/src/ch03-05-control-flow.md index 60d6b95a96..aac0e0c653 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 could choose to 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`. From 4e63e84c552186e5c8c18448188cced969e9a4e0 Mon Sep 17 00:00:00 2001 From: Herbert Reiter <46045854+damoasda@users.noreply.github.com> Date: Sat, 9 Mar 2024 14:40:44 +0100 Subject: [PATCH 4/6] Fix missing column separator --- src/appendix-02-operators.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.) | From 41f759beb24b916e49fbb21faad913ac2dbb12ec Mon Sep 17 00:00:00 2001 From: Herbert Reiter <46045854+damoasda@users.noreply.github.com> Date: Sat, 9 Mar 2024 14:42:43 +0100 Subject: [PATCH 5/6] Update compiler message --- src/ch11-01-writing-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 62572d1b09fe69bf9420ff7ca4592e11e1849707 Mon Sep 17 00:00:00 2001 From: Chris Krycho Date: Wed, 27 Mar 2024 12:19:03 -0600 Subject: [PATCH 6/6] Slight wording clarification in ch. 3.5 about for loops --- src/ch03-05-control-flow.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch03-05-control-flow.md b/src/ch03-05-control-flow.md index aac0e0c653..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 could 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`.