diff --git a/src/ch04-01-what-is-ownership.md b/src/ch04-01-what-is-ownership.md index 2f03d1cf0f..b450e4f910 100644 --- a/src/ch04-01-what-is-ownership.md +++ b/src/ch04-01-what-is-ownership.md @@ -265,7 +265,6 @@ the memory that holds the contents of the string, a length, and a capacity. This group of data is stored on the stack. On the right is the memory on the heap that holds the contents. - {{#include img/trpl04-01.svg}} Figure 4-1: Representation in memory of a `String` @@ -282,7 +281,6 @@ pointer, the length, and the capacity that are on the stack. We do not copy the data on the heap that the pointer refers to. In other words, the data representation in memory looks like Figure 4-2. - {{#include img/trpl04-02.svg}} Figure 4-2: Representation in memory of the variable `s2` @@ -293,7 +291,6 @@ look like if Rust instead copied the heap data as well. If Rust did this, the operation `s2 = s1` could be very expensive in terms of runtime performance if the data on the heap were large. - {{#include img/trpl04-03.svg}} Figure 4-3: Another possibility for what `s2 = s1` might @@ -330,7 +327,6 @@ because Rust also invalidates the first variable, instead of calling it a shallow copy, it’s known as a *move*. In this example, we would say that `s1` was *moved* into `s2`. So what actually happens is shown in Figure 4-4. - {{#include img/trpl04-04.svg}} Figure 4-4: Representation in memory after `s1` has been diff --git a/src/ch04-02-references-and-borrowing.md b/src/ch04-02-references-and-borrowing.md index 515097715a..7a84b58435 100644 --- a/src/ch04-02-references-and-borrowing.md +++ b/src/ch04-02-references-and-borrowing.md @@ -25,7 +25,6 @@ function return value is gone. Second, note that we pass `&s1` into `String`. These ampersands represent *references*, and they allow you to refer to some value without taking ownership of it. Figure 4-5 depicts this concept. - {{#include img/trpl04-05.svg}} Figure 4-5: A diagram of `&String s` pointing at `String diff --git a/src/ch04-03-slices.md b/src/ch04-03-slices.md index 0a71e0436f..7fe64a544b 100644 --- a/src/ch04-03-slices.md +++ b/src/ch04-03-slices.md @@ -123,7 +123,6 @@ byte at index 6 of `s` with a length value of 5. Figure 4-6 shows this in a diagram. - {{#include img/trpl04-06.svg}} Figure 4-6: String slice referring to part of a diff --git a/src/ch15-01-box.md b/src/ch15-01-box.md index 0c09046945..b3f78267ef 100644 --- a/src/ch15-01-box.md +++ b/src/ch15-01-box.md @@ -178,7 +178,6 @@ type needs, the compiler looks at the variants, starting with the `Cons` variant. The `Cons` variant holds a value of type `i32` and a value of type `List`, and this process continues infinitely, as shown in Figure 15-1. - {{#include img/trpl15-01.svg}} Figure 15-1: An infinite `List` consisting of infinite @@ -233,7 +232,6 @@ broken the infinite, recursive chain, so the compiler can figure out the size it needs to store a `List` value. Figure 15-2 shows what the `Cons` variant looks like now. - {{#include img/trpl15-02.svg}} Figure 15-2: A `List` that is not infinitely sized diff --git a/src/ch15-04-rc.md b/src/ch15-04-rc.md index e1048bd0c0..56a5dbb76c 100644 --- a/src/ch15-04-rc.md +++ b/src/ch15-04-rc.md @@ -35,7 +35,6 @@ Let’s return to our cons list example in Listing 15-5. Recall that we defined it using `Box`. This time, we’ll create two lists that both share ownership of a third list. Conceptually, this looks similar to Figure 15-3: - {{#include img/trpl15-03.svg}} Figure 15-3: Two lists, `b` and `c`, sharing ownership of diff --git a/src/ch15-06-reference-cycles.md b/src/ch15-06-reference-cycles.md index 1303609a5d..0f620c0a5c 100644 --- a/src/ch15-06-reference-cycles.md +++ b/src/ch15-06-reference-cycles.md @@ -75,7 +75,6 @@ well. This instance’s memory can’t be dropped either, because the other remain uncollected forever. To visualize this reference cycle, we’ve created a diagram in Figure 15-4. - {{#include img/trpl15-04.svg}} Figure 15-4: A reference cycle of lists `a` and `b` diff --git a/src/img/trpl04-01.svg b/src/img/trpl04-01.svg index 26fa210d04..3ebd08dc76 100644 --- a/src/img/trpl04-01.svg +++ b/src/img/trpl04-01.svg @@ -1,6 +1,6 @@ - + - %3 + Figure 4-1 table0 diff --git a/src/img/trpl04-02.svg b/src/img/trpl04-02.svg index 419c88c5bf..50a6fa0d43 100644 --- a/src/img/trpl04-02.svg +++ b/src/img/trpl04-02.svg @@ -1,6 +1,6 @@ - + - %3 + Figure 4-2 table0 diff --git a/src/img/trpl04-03.svg b/src/img/trpl04-03.svg index 3e7ad84730..5f5bfe6704 100644 --- a/src/img/trpl04-03.svg +++ b/src/img/trpl04-03.svg @@ -1,6 +1,6 @@ - + - %3 + Figure 4-3 table0 diff --git a/src/img/trpl04-04.svg b/src/img/trpl04-04.svg index 0b82099a3e..a23dd32d54 100644 --- a/src/img/trpl04-04.svg +++ b/src/img/trpl04-04.svg @@ -1,6 +1,6 @@ - + - %3 + Figure 4-4 table0 diff --git a/src/img/trpl04-05.svg b/src/img/trpl04-05.svg index b9abb8eb95..ec5aa1cfd1 100644 --- a/src/img/trpl04-05.svg +++ b/src/img/trpl04-05.svg @@ -1,6 +1,6 @@ - + - %3 + Figure 4-5 table0 diff --git a/src/img/trpl04-06.svg b/src/img/trpl04-06.svg index 13c9669533..3b707f3ada 100644 --- a/src/img/trpl04-06.svg +++ b/src/img/trpl04-06.svg @@ -1,6 +1,6 @@ - + - %3 + Figure 4-6 table0 diff --git a/src/img/trpl15-01.svg b/src/img/trpl15-01.svg index 270f8fefd2..c18014ff91 100644 --- a/src/img/trpl15-01.svg +++ b/src/img/trpl15-01.svg @@ -1,6 +1,6 @@ - + - %3 + Figure 15-1 table0 diff --git a/src/img/trpl15-02.svg b/src/img/trpl15-02.svg index a579b71a28..c3244d29d8 100644 --- a/src/img/trpl15-02.svg +++ b/src/img/trpl15-02.svg @@ -1,6 +1,6 @@ - + - %3 + Figure 15-2 table0 diff --git a/src/img/trpl15-03.svg b/src/img/trpl15-03.svg index a86eea8786..622b10ad67 100644 --- a/src/img/trpl15-03.svg +++ b/src/img/trpl15-03.svg @@ -1,6 +1,6 @@ - + - %3 + Figure 15-3 table4 diff --git a/src/img/trpl15-04.svg b/src/img/trpl15-04.svg index 5a94dc1050..d60504d116 100644 --- a/src/img/trpl15-04.svg +++ b/src/img/trpl15-04.svg @@ -1,5 +1,6 @@ - + + Figure 15-4 l1