From d339373a838fd312a8a9bcc9487e1ffbc9e1582f Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Thu, 27 Oct 2022 15:15:19 -0400 Subject: [PATCH] Fix plural and incorrect phrase. Fixes #3359. --- src/ch05-03-method-syntax.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ch05-03-method-syntax.md b/src/ch05-03-method-syntax.md index 2b296e5d9f..d25e55b18c 100644 --- a/src/ch05-03-method-syntax.md +++ b/src/ch05-03-method-syntax.md @@ -78,14 +78,14 @@ the instance’s `width` field is greater than `0` and `false` if the value is method `width`. When we don’t use parentheses, Rust knows we mean the field `width`. -Often, but not always, when we give methods with the same name as a field we -want it to only return the value in the field and do nothing else. Methods like -this are called *getters*, and Rust does not implement them automatically for -struct fields as some other languages do. Getters are useful because you can -make the field private but the method public, and thus enable read-only access -to that field as part of the type’s public API. We will discuss what public and -private are and how to designate a field or method as public or private in -[Chapter 7][public]. +Often, but not always, when we give a method the same name as a field we want +it to only return the value in the field and do nothing else. Methods like this +are called *getters*, and Rust does not implement them automatically for struct +fields as some other languages do. Getters are useful because you can make the +field private but the method public, and thus enable read-only access to that +field as part of the type’s public API. We will discuss what public and private +are and how to designate a field or method as public or private in [Chapter +7][public]. > ### Where’s the `->` Operator? >