From 7b3ef1314661b37e14b1b042ad152892e9e6ff18 Mon Sep 17 00:00:00 2001 From: Reed Date: Mon, 18 Mar 2024 11:39:00 -0700 Subject: [PATCH 1/2] Fix a typo in the alloc::string::String docs --- library/alloc/src/string.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index c4dcff1b1c49c..f5c1245a7624a 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -261,7 +261,7 @@ use crate::vec::Vec; /// /// A `String` is made up of three components: a pointer to some bytes, a /// length, and a capacity. The pointer points to an internal buffer `String` -/// uses to store its data. The length is the number of bytes currently stored +/// used to store its data. The length is the number of bytes currently stored /// in the buffer, and the capacity is the size of the buffer in bytes. As such, /// the length will always be less than or equal to the capacity. /// From 58e2ad3d582998453d34c182129f02653f565b5f Mon Sep 17 00:00:00 2001 From: Reed Date: Sun, 24 Mar 2024 12:20:39 -0700 Subject: [PATCH 2/2] Amended wording --- library/alloc/src/string.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index f5c1245a7624a..7dba5b4e1f9fa 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -260,8 +260,8 @@ use crate::vec::Vec; /// # Representation /// /// A `String` is made up of three components: a pointer to some bytes, a -/// length, and a capacity. The pointer points to an internal buffer `String` -/// used to store its data. The length is the number of bytes currently stored +/// length, and a capacity. The pointer points to the internal buffer which `String` +/// uses to store its data. The length is the number of bytes currently stored /// in the buffer, and the capacity is the size of the buffer in bytes. As such, /// the length will always be less than or equal to the capacity. ///