diff --git a/second-edition/src/ch04-03-slices.md b/second-edition/src/ch04-03-slices.md index ef334d547..af2c85b41 100644 --- a/second-edition/src/ch04-03-slices.md +++ b/second-edition/src/ch04-03-slices.md @@ -59,7 +59,7 @@ Next, we create an iterator over the array of bytes using the `iter` method : for (i, &item) in bytes.iter().enumerate() { ``` -We’ll discuss iterators in more detail in Chapter 16. For now, know that `iter` +We’ll discuss iterators in more detail in Chapter 13. For now, know that `iter` is a method that returns each element in a collection, and `enumerate` wraps the result of `iter` and returns each element as part of a tuple instead. The first element of the returned tuple is the index, and the second element is a diff --git a/second-edition/src/ch05-01-method-syntax.md b/second-edition/src/ch05-01-method-syntax.md index e769001e5..4c2870a03 100644 --- a/second-edition/src/ch05-01-method-syntax.md +++ b/second-edition/src/ch05-01-method-syntax.md @@ -5,7 +5,7 @@ their name, they can have parameters and return values, and they contain some code that gets run when they’re called from somewhere else. Methods are different from functions, however, because they’re defined within the context of a struct (or an enum or a trait object, which we will cover in Chapters 6 -and 13, respectively), and their first parameter is always `self`, which +and 17, respectively), and their first parameter is always `self`, which represents the instance of the struct that the method is being called on. ### Defining Methods diff --git a/second-edition/src/ch07-03-importing-names-with-use.md b/second-edition/src/ch07-03-importing-names-with-use.md index 2e6d5f369..d42fa3689 100644 --- a/second-edition/src/ch07-03-importing-names-with-use.md +++ b/second-edition/src/ch07-03-importing-names-with-use.md @@ -153,7 +153,7 @@ mod tests { } ``` -We’ll explain more about testing in Chapter 12, but parts of this should make +We’ll explain more about testing in Chapter 11, but parts of this should make sense now: we have a module named `tests` that lives next to our other modules and contains one function named `it_works`. Even though there are special annotations, the `tests` module is just another module! So our module hierarchy