mirror of
https://github.com/mainmatter/100-exercises-to-learn-rust
synced 2024-12-26 21:58:49 +01:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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 |
|
||||
|
|
Loading…
Reference in a new issue