From 86e30b605c585f2841dfd4bddb5afb696ab03cb5 Mon Sep 17 00:00:00 2001 From: Ivan Tham Date: Thu, 1 Oct 2020 10:08:51 +0800 Subject: [PATCH] Fix typo in vec doc "tries to reserves" --- library/alloc/src/vec.rs | 7 ++++--- 1 file 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 Vec { 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`. 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`. 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