Fix typo in 10_clone.md illustration (#10)
authorLoup Federico <16464925+Sh099078@users.noreply.github.com>
Sat, 18 May 2024 10:03:05 +0000 (12:03 +0200)
committerGitHub <noreply@github.com>
Sat, 18 May 2024 10:03:05 +0000 (12:03 +0200)
The clone() illustration shows two `s` values in the stack when one of them is the original `s` value which got cloned and the other one should be the new `t` value created from `s`.

Rename the second value from `s` to `t`.

book/src/04_traits/10_clone.md

index 430026b..a897b48 100644 (file)
@@ -75,7 +75,7 @@ Heap:  | H | e | l | l | o |
 When `let t = s.clone()` is executed, a whole new region is allocated on the heap to store a copy of the data:
 
 ```text
-                    s                                    s
+                    s                                    t
       +---------+--------+----------+      +---------+--------+----------+
 Stack | pointer | length | capacity |      | pointer | length | capacity |
       |  |      |   5    |    5     |      |  |      |   5    |    5     |