From 8a46812ba119cd05fcce0df0bbb898bc1a213bee Mon Sep 17 00:00:00 2001 From: Chris Krycho Date: Wed, 11 Dec 2024 13:42:18 -0700 Subject: [PATCH] Ch. 4: further tweaks to explanatory comment in Listing 4.8 --- .../ch04-understanding-ownership/listing-04-08/src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/listings/ch04-understanding-ownership/listing-04-08/src/main.rs b/listings/ch04-understanding-ownership/listing-04-08/src/main.rs index 942553b88..48106c634 100644 --- a/listings/ch04-understanding-ownership/listing-04-08/src/main.rs +++ b/listings/ch04-understanding-ownership/listing-04-08/src/main.rs @@ -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