Skip to content

Commit

Permalink
Update move.md (#1944)
Browse files Browse the repository at this point in the history
Fix the String length (and capacity) to make it less confusing.
  • Loading branch information
cdman authored Mar 26, 2024
1 parent f2601d1 commit ec5d4af
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/memory-management/move.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Before move to `s2`:
: s1 : : :
: +-----------+-------+ : : +----+----+----+----+----+----+ :
: | ptr | o---+---+-----+-->| H | e | l | l | o | ! | :
: | len | 4 | : : +----+----+----+----+----+----+ :
: | capacity | 4 | : : :
: | len | 6 | : : +----+----+----+----+----+----+ :
: | capacity | 6 | : : :
: +-----------+-------+ : : :
: : `- - - - - - - - - - - - - - - - - - -'
: :
Expand All @@ -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 | :
: +-----------+-------+ :
: :
`- - - - - - - - - - - - - -'
Expand Down

0 comments on commit ec5d4af

Please sign in to comment.