From f2865b25dbffb66a9a2f6bb19ec84fe2187a51ef Mon Sep 17 00:00:00 2001 From: Loup Federico <16464925+Sh099078@users.noreply.github.com> Date: Sat, 18 May 2024 12:03:05 +0200 Subject: [PATCH] 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`. --- book/src/04_traits/10_clone.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 | -- 2.45.2