Fix typo in 10_clone.md illustration (#10)
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`.
This commit is contained in:
parent
45c5e390c0
commit
f2865b25db
|
@ -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:
|
When `let t = s.clone()` is executed, a whole new region is allocated on the heap to store a copy of the data:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
s s
|
s t
|
||||||
+---------+--------+----------+ +---------+--------+----------+
|
+---------+--------+----------+ +---------+--------+----------+
|
||||||
Stack | pointer | length | capacity | | pointer | length | capacity |
|
Stack | pointer | length | capacity | | pointer | length | capacity |
|
||||||
| | | 5 | 5 | | | | 5 | 5 |
|
| | | 5 | 5 | | | | 5 | 5 |
|
||||||
|
|
Loading…
Reference in New Issue