From: Loup Federico <16464925+Sh099078@users.noreply.github.com> Date: Sat, 18 May 2024 10:03:05 +0000 (+0200) Subject: Fix typo in 10_clone.md illustration (#10) X-Git-Url: http://git.euphorik.ch/index.cgi?a=commitdiff_plain;h=f2865b25dbffb66a9a2f6bb19ec84fe2187a51ef;p=rust_exercises.git 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`. --- diff --git a/book/src/04_traits/10_clone.md b/book/src/04_traits/10_clone.md index 430026b..a897b48 100644 --- a/book/src/04_traits/10_clone.md +++ b/book/src/04_traits/10_clone.md @@ -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 |