diff options
| author | Ivan Tham <pickfire@riseup.net> | 2020-10-01 10:08:51 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-01 10:08:51 +0800 |
| commit | 86e30b605c585f2841dfd4bddb5afb696ab03cb5 (patch) | |
| tree | 1df8f53d12ccd1a05b7d232bd8ab7b73a8caf227 | |
| parent | 9bb55dc8642d811d66a7599812009cc063577e00 (diff) | |
| download | rust-86e30b605c585f2841dfd4bddb5afb696ab03cb5.tar.gz rust-86e30b605c585f2841dfd4bddb5afb696ab03cb5.zip | |
Fix typo in vec doc "tries to reserves"
| -rw-r--r-- | library/alloc/src/vec.rs | 7 |
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 |
