Ch. 17: fix internal links with new ch. order

Note: this does *not* include all fixes for the text, only for the links
themselves. For the text, we will also need to search for references to
chapters 17-20. This catches a few of those along the way, but there are
no doubt others.
This commit is contained in:
Chris Krycho
2024-07-22 12:04:09 -06:00
parent 45f163588d
commit 463b819a75
21 changed files with 32 additions and 31 deletions

View File

@@ -3,8 +3,8 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../ch17-03-oo-design-patterns.html) instead.
version of the book](../ch18-03-oo-design-patterns.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-03-oo-design-patterns.html).
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-03-oo-design-patterns.html).

View File

@@ -3,8 +3,8 @@
The second edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../ch17-03-oo-design-patterns.html) instead.
version of the book](../ch18-03-oo-design-patterns.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/second-edition/ch17-03-oo-design-patterns.html).
1.30](https://doc.rust-lang.org/1.30.0/book/second-edition/ch17-03-oo-design-patterns.html).

View File

@@ -3,8 +3,8 @@
The second edition of the book is no longer distributed with Rust's documentation.
If you came here via a link or web search, you may want to check out [the current
version of the book](../ch18-00-patterns.html) instead.
version of the book](../ch19-00-patterns.html) instead.
If you have an internet connection, you can [find a copy distributed with
Rust
1.30](https://doc.rust-lang.org/1.30.0/book/second-edition/ch18-00-patterns.html).
1.30](https://doc.rust-lang.org/1.30.0/book/second-edition/ch18-00-patterns.html).

View File

@@ -184,4 +184,4 @@ ch05-01-defining-structs.html#creating-instances-from-other-instances-with-struc
ch04-01-what-is-ownership.html#stack-only-data-copy
[ways-variables-and-data-interact-clone]:
ch04-01-what-is-ownership.html#ways-variables-and-data-interact-clone
[macros]: ch19-06-macros.html#macros
[macros]: ch20-06-macros.html#macros

View File

@@ -250,6 +250,6 @@ But structs arent the only way you can create custom types: lets turn to
Rusts enum feature to add another tool to your toolbox.
[enums]: ch06-00-enums.html
[trait-objects]: ch17-02-trait-objects.md
[trait-objects]: ch18-02-trait-objects.md
[public]: ch07-03-paths-for-referring-to-an-item-in-the-module-tree.html#exposing-paths-with-the-pub-keyword
[modules]: ch07-02-defining-modules-to-control-scope-and-privacy.html

View File

@@ -246,9 +246,10 @@ that doesnt match a pattern in an earlier arm, and we dont want to run any
code in this case.
Theres more about patterns and matching that well cover in [Chapter
18][ch18-00-patterns]<!-- ignore -->. For now, were going to move on to the
19][ch19-00-patterns]<!-- ignore -->. For now, were going to move on to the
`if let` syntax, which can be useful in situations where the `match` expression
is a bit wordy.
[tuples]: ch03-02-data-types.html#the-tuple-type
[ch18-00-patterns]: ch18-00-patterns.html
[ch19-00-patterns]: ch19-00-patterns.html

View File

@@ -533,5 +533,5 @@ lets return to the topic of how to decide which is appropriate to use in whic
cases.
[handle_failure]: ch02-00-guessing-game-tutorial.html#handling-potential-failure-with-result
[trait-objects]: ch17-02-trait-objects.html#using-trait-objects-that-allow-for-values-of-different-types
[trait-objects]: ch18-02-trait-objects.html#using-trait-objects-that-allow-for-values-of-different-types
[termination]: ../std/process/trait.Termination.html

View File

@@ -219,4 +219,4 @@ Now that youve seen useful ways that the standard library uses generics with
the `Option` and `Result` enums, well talk about how generics work and how you
can use them in your code.
[encoding]: ch17-03-oo-design-patterns.html#encoding-states-and-behavior-as-types
[encoding]: ch18-03-oo-design-patterns.html#encoding-states-and-behavior-as-types

View File

@@ -385,5 +385,5 @@ that checks for behavior at runtime because weve already checked at compile
time. Doing so improves performance without having to give up the flexibility
of generics.
[using-trait-objects-that-allow-for-values-of-different-types]: ch17-02-trait-objects.html#using-trait-objects-that-allow-for-values-of-different-types
[using-trait-objects-that-allow-for-values-of-different-types]: ch18-02-trait-objects.html#using-trait-objects-that-allow-for-values-of-different-types
[methods]: ch05-03-method-syntax.html#defining-methods

View File

@@ -47,4 +47,4 @@ detail.
[ch10]: ch10-00-generics.html
[ch11]: ch11-00-testing.html
[ch13]: ch13-00-functional-features.html
[ch17]: ch17-00-oop.html
[ch17]: ch18-00-oop.html

View File

@@ -491,5 +491,5 @@ write some tests!
[ch9-custom-types]: ch09-03-to-panic-or-not-to-panic.html#creating-custom-types-for-validation
[ch9-error-guidelines]: ch09-03-to-panic-or-not-to-panic.html#guidelines-for-error-handling
[ch9-result]: ch09-02-recoverable-errors-with-result.html
[ch17]: ch17-00-oop.html
[ch17]: ch18-00-oop.html
[ch9-question-mark]: ch09-02-recoverable-errors-with-result.html#a-shortcut-for-propagating-errors-the--operator

View File

@@ -252,4 +252,4 @@ even more important to the functionality provided by the other smart pointer
types well discuss in the rest of this chapter. Lets explore these two traits
in more detail.
[trait-objects]: ch17-02-trait-objects.html#using-trait-objects-that-allow-for-values-of-different-types
[trait-objects]: ch18-02-trait-objects.html#using-trait-objects-that-allow-for-values-of-different-types

View File

@@ -508,4 +508,4 @@ That is a good note to turn to our final section and wrap up this walk through
async in Rust, by discussing how futures (including streams), tasks, and threads
relate to each other, and how you can use them together.
[17-02-messages]: /ch17-02-concurrency-with-async.md#message-passing
[17-02-messages]: ch17-02-concurrency-with-async.md#message-passing

View File

@@ -74,7 +74,7 @@ up correctly.
These limitations make threads harder to compose than futures. It is much more
difficult, for example, to build something like the `timeout` we built in
[“Building Our Own Async Abstractions”][combining-futures], or the `throttle`
method we used with streams in [“Working With Streams”][streams]. The fact that
method we used with streams in [“Composing Streams”][streams]. The fact that
futures are richer data structures means they *can* be composed together more
naturally, as we have seen.
@@ -116,5 +116,5 @@ as your Rust programs get bigger. In addition, well discuss how Rusts idio
relate to those you might be familiar with from object-oriented programming.
[combining-futures]: /ch17-04-more-ways-of-combining-futures.md#building-our-own-async-abstractions
[streams]: /ch17-05-streams.md#working-with-streams
[combining-futures]: ch17-04-more-ways-of-combining-futures.md#building-our-own-async-abstractions
[streams]: ch17-05-streams.md#composing-streams

View File

@@ -253,4 +253,4 @@ support in Listing 17-9, so its a trade-off to consider.
[performance-of-code-using-generics]:
ch10-01-syntax.html#performance-of-code-using-generics
[dynamically-sized]: ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait
[dynamically-sized]: ch20-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait

View File

@@ -513,4 +513,4 @@ lots of flexibility. Weve looked at them briefly throughout the book but
havent seen their full capability yet. Lets go!
[more-info-than-rustc]: ch09-03-to-panic-or-not-to-panic.html#cases-in-which-you-have-more-information-than-the-compiler
[macros]: ch19-06-macros.html#macros
[macros]: ch20-06-macros.html#macros

View File

@@ -247,4 +247,4 @@ be irrefutable; in other circumstances, they can be refutable. Well discuss
these two concepts next.
[ignoring-values-in-a-pattern]:
ch18-03-pattern-syntax.html#ignoring-values-in-a-pattern
ch19-03-pattern-syntax.html#ignoring-values-in-a-pattern

View File

@@ -459,7 +459,7 @@ behavior—we would have to implement just the methods we do want manually.
This newtype pattern is also useful even when traits are not involved. Lets
switch focus and look at some advanced ways to interact with Rusts type system.
[newtype]: ch19-03-advanced-traits.html#using-the-newtype-pattern-to-implement-external-traits-on-external-types
[newtype]: ch20-03-advanced-traits.html#using-the-newtype-pattern-to-implement-external-traits-on-external-types
[implementing-a-trait-on-a-type]:
ch10-02-traits.html#implementing-a-trait-on-a-type
[traits-defining-shared-behavior]:

View File

@@ -288,10 +288,10 @@ pointer. In this case, weve chosen a reference.
Next, well talk about functions and closures!
[encapsulation-that-hides-implementation-details]:
ch17-01-what-is-oo.html#encapsulation-that-hides-implementation-details
ch18-01-what-is-oo.html#encapsulation-that-hides-implementation-details
[string-slices]: ch04-03-slices.html#string-slices
[the-match-control-flow-operator]:
ch06-02-match.html#the-match-control-flow-operator
[using-trait-objects-that-allow-for-values-of-different-types]:
ch17-02-trait-objects.html#using-trait-objects-that-allow-for-values-of-different-types
[using-the-newtype-pattern]: ch19-03-advanced-traits.html#using-the-newtype-pattern-to-implement-external-traits-on-external-types
ch18-02-trait-objects.html#using-trait-objects-that-allow-for-values-of-different-types
[using-the-newtype-pattern]: ch20-03-advanced-traits.html#using-the-newtype-pattern-to-implement-external-traits-on-external-types

View File

@@ -119,12 +119,12 @@ We can use a trait object:
This code will compile just fine. For more about trait objects, refer to the
section [“Using Trait Objects That Allow for Values of Different
Types”][using-trait-objects-that-allow-for-values-of-different-types]<!--
ignore --> in Chapter 17.
ignore --> in Chapter 18.
Next, lets look at macros!
[advanced-traits]:
ch19-03-advanced-traits.html#advanced-traits
ch20-03-advanced-traits.html#advanced-traits
[enum-values]: ch06-01-defining-an-enum.html#enum-values
[using-trait-objects-that-allow-for-values-of-different-types]:
ch17-02-trait-objects.html#using-trait-objects-that-allow-for-values-of-different-types
ch18-02-trait-objects.html#using-trait-objects-that-allow-for-values-of-different-types

View File

@@ -690,7 +690,7 @@ the associated block. In Listing 20-21, the lock remains held for the duration
of the call to `job()`, meaning other workers cannot receive jobs.
[creating-type-synonyms-with-type-aliases]:
ch19-04-advanced-types.html#creating-type-synonyms-with-type-aliases
ch20-04-advanced-types.html#creating-type-synonyms-with-type-aliases
[integer-types]: ch03-02-data-types.html#integer-types
[fn-traits]:
ch13-01-closures.html#moving-captured-values-out-of-the-closure-and-the-fn-traits