Skip to content

Commit 00730fd

Browse files
committed
Auto merge of #77383 - pickfire:patch-6, r=Mark-Simulacrum
Fix typo in vec doc "tries to reserves" Superseeds #77192
2 parents 3bbc443 + 86e30b6 commit 00730fd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

library/alloc/src/vec.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -567,9 +567,10 @@ impl<T> Vec<T> {
567567
self.buf.try_reserve(self.len, additional)
568568
}
569569

570-
/// Tries to reserves the minimum capacity for exactly `additional` more elements to
571-
/// be inserted in the given `Vec<T>`. After calling `try_reserve_exact`,
572-
/// capacity will be greater than or equal to `self.len() + additional`.
570+
/// Tries to reserve the minimum capacity for exactly `additional`
571+
/// elements to be inserted in the given `Vec<T>`. After calling
572+
/// `try_reserve_exact`, capacity will be greater than or equal to
573+
/// `self.len() + additional` if it returns `Ok(())`.
573574
/// Does nothing if the capacity is already sufficient.
574575
///
575576
/// Note that the allocator may give the collection more space than it

0 commit comments

Comments
 (0)