From bf43b7a5162e8ccd60267a5b0cb90ad344e95b2c Mon Sep 17 00:00:00 2001 From: Dane Harrigan <72265290+dane@users.noreply.github.com> Date: Thu, 5 Dec 2024 10:32:50 -0500 Subject: [PATCH 1/2] Revise sentence to not refer to two subjects as it --- src/ch04-02-references-and-borrowing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ch04-02-references-and-borrowing.md b/src/ch04-02-references-and-borrowing.md index cb4d172e85..22ceb2bdb1 100644 --- a/src/ch04-02-references-and-borrowing.md +++ b/src/ch04-02-references-and-borrowing.md @@ -45,8 +45,8 @@ Let’s take a closer look at the function call here: ``` The `&s1` syntax lets us create a reference that _refers_ to the value of `s1` -but does not own it. Because it does not own it, the value it points to will -not be dropped when the reference stops being used. +but does not own it. Because the reference does not own it, the value it points +to will not be dropped when the reference stops being used. Likewise, the signature of the function uses `&` to indicate that the type of the parameter `s` is a reference. Let’s add some explanatory annotations: From d65bd3cc316ce9c59f91c549be70c69b2384f018 Mon Sep 17 00:00:00 2001 From: Dane Harrigan <72265290+dane@users.noreply.github.com> Date: Thu, 5 Dec 2024 10:43:51 -0500 Subject: [PATCH 2/2] Revise annotations to not refer to subjects as it --- .../no-listing-08-reference-with-annotations/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/listings/ch04-understanding-ownership/no-listing-08-reference-with-annotations/src/main.rs b/listings/ch04-understanding-ownership/no-listing-08-reference-with-annotations/src/main.rs index 964fd233f7..e9894fab67 100644 --- a/listings/ch04-understanding-ownership/no-listing-08-reference-with-annotations/src/main.rs +++ b/listings/ch04-understanding-ownership/no-listing-08-reference-with-annotations/src/main.rs @@ -9,6 +9,6 @@ fn main() { // ANCHOR: here fn calculate_length(s: &String) -> usize { // s is a reference to a String s.len() -} // Here, s goes out of scope. But because it does not have ownership of what - // it refers to, it is not dropped. +} // Here, s goes out of scope. But because s does not have ownership of what + // it refers to, the value is not dropped. // ANCHOR_END: here