From ec5d4afa198cce47cb153e9f9610cf656f23e128 Mon Sep 17 00:00:00 2001 From: Attila-Mihaly Balazs Date: Tue, 26 Mar 2024 14:31:39 +0100 Subject: [PATCH] Update move.md (#1944) Fix the String length (and capacity) to make it less confusing. --- src/memory-management/move.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/memory-management/move.md b/src/memory-management/move.md index 37d42c73005..704dc8a144d 100644 --- a/src/memory-management/move.md +++ b/src/memory-management/move.md @@ -28,8 +28,8 @@ Before move to `s2`: : s1 : : : : +-----------+-------+ : : +----+----+----+----+----+----+ : : | ptr | o---+---+-----+-->| H | e | l | l | o | ! | : -: | len | 4 | : : +----+----+----+----+----+----+ : -: | capacity | 4 | : : : +: | len | 6 | : : +----+----+----+----+----+----+ : +: | capacity | 6 | : : : : +-----------+-------+ : : : : : `- - - - - - - - - - - - - - - - - - -' : : @@ -45,15 +45,15 @@ After move to `s2`: : s1 "(inaccessible)" : : : : +-----------+-------+ : : +----+----+----+----+----+----+ : : | ptr | o---+---+--+--+-->| H | e | l | l | o | ! | : -: | len | 4 | : | : +----+----+----+----+----+----+ : -: | capacity | 4 | : | : : +: | len | 6 | : | : +----+----+----+----+----+----+ : +: | capacity | 6 | : | : : : +-----------+-------+ : | : : : : | `- - - - - - - - - - - - - - - - - - -' : s2 : | : +-----------+-------+ : | : | ptr | o---+---+--' -: | len | 4 | : -: | capacity | 4 | : +: | len | 6 | : +: | capacity | 6 | : : +-----------+-------+ : : : `- - - - - - - - - - - - - -'