about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-10-01 05:35:48 +0000
committerbors <bors@rust-lang.org>2020-10-01 05:35:48 +0000
commit00730fd0f1df0718f4e0f82298bff3bf1f44a98b (patch)
tree1492d583de5c3b922f9f97e72ce49387119b6396
parent3bbc443cc6657b5df623101f74688ec92e35f35d (diff)
parent86e30b605c585f2841dfd4bddb5afb696ab03cb5 (diff)
downloadrust-00730fd0f1df0718f4e0f82298bff3bf1f44a98b.tar.gz
rust-00730fd0f1df0718f4e0f82298bff3bf1f44a98b.zip
Auto merge of #77383 - pickfire:patch-6, r=Mark-Simulacrum
Fix typo in vec doc "tries to reserves"

Superseeds #77192
-rw-r--r--library/alloc/src/vec.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/library/alloc/src/vec.rs b/library/alloc/src/vec.rs
index 5114f578f02..b20ccd388d1 100644
--- a/library/alloc/src/vec.rs
+++ b/library/alloc/src/vec.rs
@@ -567,9 +567,10 @@ impl<T> Vec<T> {
         self.buf.try_reserve(self.len, additional)
     }
 
-    /// Tries to reserves the minimum capacity for exactly `additional` more elements to
-    /// be inserted in the given `Vec<T>`. After calling `try_reserve_exact`,
-    /// capacity will be greater than or equal to `self.len() + additional`.
+    /// Tries to reserve the minimum capacity for exactly `additional`
+    /// elements to be inserted in the given `Vec<T>`. 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