Skip to content

Commit 7a4fa2d

Browse files
authored
Fix broken links (mainmatter#47)
1 parent eb0b4f7 commit 7a4fa2d

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

book/src/02_basic_calculator/01_integers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ error[E0308]: mismatched types
117117
|
118118
```
119119

120-
We'll see how to convert between types [later in this course](../04_traits/08_from).
120+
We'll see how to convert between types [later in this course](../04_traits/09_from).
121121

122122
## References
123123

@@ -134,5 +134,5 @@ behave.
134134
We'll talk about operator overloading [later in the course](../04_traits/03_operator_overloading), after we've covered traits.
135135

136136
[^coercion]: There are some exceptions to this rule, mostly related to references, smart pointers and ergonomics. We'll
137-
cover those [later on](../04_traits/06_deref).
137+
cover those [later on](../04_traits/07_deref).
138138
A mental model of "all conversions are explicit" will serve you well in the meantime.

book/src/02_basic_calculator/04_panics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Panics
22

3-
Let's go back to the `speed` function you wrote for the ["Variables" section](../02_variables/README.md).
3+
Let's go back to the `speed` function you wrote for the ["Variables" section](02_variables).
44
It probably looked something like this:
55

66
```rust

book/src/02_basic_calculator/10_as_casting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ It is also fairly limited: you can only rely on `as` casting
9292
for primitive types and a few other special cases.
9393
When working with composite types, you'll have to rely on
9494
different conversion mechanisms ([fallible](../05_ticket_v2/13_try_from)
95-
and [infallible](../04_traits/08_from)), which we'll explore later on.
95+
and [infallible](../04_traits/09_from)), which we'll explore later on.
9696

9797
## References
9898

book/src/03_ticket_v1/05_encapsulation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ let ticket = Ticket {
3838
You've seen this in action in the previous exercise on visibility.
3939
We now need to provide one or more public **constructors**—i.e. static methods or functions that can be used
4040
from outside the module to create a new instance of the struct.
41-
Luckily enough we already have one: `Ticket::new`, as implemented in [a previous exercise](../02_validation/README.md).
41+
Luckily enough we already have one: `Ticket::new`, as implemented in [a previous exercise](02_validation).
4242

4343
## Accessor methods
4444

book/src/03_ticket_v1/10_references_in_memory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ They just point to a memory location, which _may_ be on the heap, but doesn't ha
4949

5050
- The exercise for this section is located in `exercises/03_ticket_v1/10_references_in_memory`
5151

52-
[^fat]: [Later in the course](../04_traits/05_str_slice) we'll talk about **fat pointers**,
52+
[^fat]: [Later in the course](../04_traits/06_str_slice) we'll talk about **fat pointers**,
5353
i.e. pointers with additional metadata. As the name implies, they are larger than
5454
the pointers we discussed in this chapter, also known as **thin pointers**.

book/src/04_traits/08_sized.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ From our previous [discussion on memory layouts](../03_ticket_v1/10_references_i
66
it would have been reasonable to expect `&str` to be represented as a single `usize` on
77
the stack, a pointer. That's not the case though. `&str` stores some **metadata** next
88
to the pointer: the length of the slice it points to. Going back to the example from
9-
[a previous section](05_str_slice.md):
9+
[a previous section](06_str_slice):
1010

1111
```rust
1212
let mut s = String::with_capacity(5);

book/src/05_ticket_v2/09_error_trait.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ that implements the `Error` trait.
2222
pub trait Error: Debug + Display {}
2323
```
2424

25-
You might recall the `:` syntax from [the `Sized` trait](../04_traits/07_sized.md)—it's used to specify **supertraits**.
25+
You might recall the `:` syntax from [the `Sized` trait](../04_traits/08_sized.md)—it's used to specify **supertraits**.
2626
For `Error`, there are two supertraits: `Debug` and `Display`. If a type wants to implement `Error`, it must also
2727
implement `Debug` and `Display`.
2828

book/src/05_ticket_v2/13_try_from.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# `TryFrom` and `TryInto`
22

3-
In the previous chapter we looked at the [`From` and `Into` traits](../04_traits/08_from.md),
3+
In the previous chapter we looked at the [`From` and `Into` traits](../04_traits/09_from.md),
44
Rust's idiomatic interfaces for **infallible** type conversions.
55
But what if the conversion is not guaranteed to succeed?
66

0 commit comments

Comments
 (0)