about summary refs log tree commit diff
path: root/library/std/src/sys_common
diff options
context:
space:
mode:
authorXuanwo <github@xuanwo.io>2021-12-29 14:02:20 +0800
committerXuanwo <github@xuanwo.io>2021-12-29 14:02:20 +0800
commitb07ae1c4d5232abcb89151eb64d81631d11a5d14 (patch)
tree99f64c4926e2be3cc98f27208abbba9425ee4d95 /library/std/src/sys_common
parent9166428be18f5348b2c6cb5301986d29e5a0af9c (diff)
downloadrust-b07ae1c4d5232abcb89151eb64d81631d11a5d14.tar.gz
rust-b07ae1c4d5232abcb89151eb64d81631d11a5d14.zip
Address comments
Signed-off-by: Xuanwo <github@xuanwo.io>
Diffstat (limited to 'library/std/src/sys_common')
-rw-r--r--library/std/src/sys_common/wtf8.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/std/src/sys_common/wtf8.rs b/library/std/src/sys_common/wtf8.rs
index 3f3f4abd214..7a6e6246357 100644
--- a/library/std/src/sys_common/wtf8.rs
+++ b/library/std/src/sys_common/wtf8.rs
@@ -232,8 +232,8 @@ impl Wtf8Buf {
         self.bytes.reserve(additional)
     }
 
-    /// Tries to reserve capacity for at least `additional` more elements to be inserted
-    /// in the given `Wtf8Buf`. The collection may reserve more space to avoid
+    /// Tries to reserve capacity for at least `additional` more length units
+    /// in the given `Wtf8Buf`. The `Wtf8Buf` may reserve more space to avoid
     /// frequent reallocations. After calling `try_reserve`, capacity will be
     /// greater than or equal to `self.len() + additional`. Does nothing if
     /// capacity is already sufficient.
@@ -253,12 +253,12 @@ impl Wtf8Buf {
     }
 
     /// Tries to reserve the minimum capacity for exactly `additional`
-    /// elements to be inserted in the given `Wtf8Buf`. After calling
+    /// length units in the given `Wtf8Buf`. After calling
     /// `try_reserve_exact`, capacity will be greater than or equal to
     /// `self.len() + additional` if it returns `Ok(())`.
     /// Does nothing if the capacity is already sufficient.
     ///
-    /// Note that the allocator may give the collection more space than it
+    /// Note that the allocator may give the `Wtf8Buf` more space than it
     /// requests. Therefore, capacity can not be relied upon to be precisely
     /// minimal. Prefer [`try_reserve`] if future insertions are expected.
     ///