From 2ac6fdc8b1d3236a38e0ba68d6f75a24377e06f6 Mon Sep 17 00:00:00 2001 From: mattko Date: Thu, 15 Apr 2021 13:01:21 +0100 Subject: [PATCH 1/2] Change the comment so its cleaner what author meant --- .../no-listing-13-reference-scope-ends/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/listings/ch04-understanding-ownership/no-listing-13-reference-scope-ends/src/main.rs b/listings/ch04-understanding-ownership/no-listing-13-reference-scope-ends/src/main.rs index 3b0a7da659..bb811622bb 100644 --- a/listings/ch04-understanding-ownership/no-listing-13-reference-scope-ends/src/main.rs +++ b/listings/ch04-understanding-ownership/no-listing-13-reference-scope-ends/src/main.rs @@ -5,7 +5,7 @@ fn main() { let r1 = &s; // no problem let r2 = &s; // no problem println!("{} and {}", r1, r2); - // r1 and r2 are no longer used after this point + // variables r1 and r2 are not used after this point let r3 = &mut s; // no problem println!("{}", r3); From 6d26493533116b31f6fbea14ff23f5a74776338b Mon Sep 17 00:00:00 2001 From: mattko Date: Mon, 19 Apr 2021 15:00:00 +0100 Subject: [PATCH 2/2] changed to 'will not be used' This should make it clearer that the variables will not be used in the future, hence the rest of the code will work. --- .../no-listing-13-reference-scope-ends/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/listings/ch04-understanding-ownership/no-listing-13-reference-scope-ends/src/main.rs b/listings/ch04-understanding-ownership/no-listing-13-reference-scope-ends/src/main.rs index bb811622bb..8619449669 100644 --- a/listings/ch04-understanding-ownership/no-listing-13-reference-scope-ends/src/main.rs +++ b/listings/ch04-understanding-ownership/no-listing-13-reference-scope-ends/src/main.rs @@ -5,7 +5,7 @@ fn main() { let r1 = &s; // no problem let r2 = &s; // no problem println!("{} and {}", r1, r2); - // variables r1 and r2 are not used after this point + // variables r1 and r2 will not be used after this point let r3 = &mut s; // no problem println!("{}", r3);