Skip to content

Commit

Permalink
Ch. 4: further tweaks to explanatory comment in Listing 4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskrycho committed Dec 11, 2024
1 parent 1dd6333 commit 8a46812
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ fn main() {

s.clear(); // this empties the String, making it equal to ""

// word still has the value 5 here, but there's no more string that
// we could meaningfully use with the value 5 as word is now totally invalid!
// `word` still has the value `5` here, but `s` no longer has any content
// that we could meaningfully use with the value `5`, so `word` is now
// totally invalid!
}
// ANCHOR_END: here

0 comments on commit 8a46812

Please sign in to comment.