about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWaffle Lapkin <waffle.lapkin@gmail.com>2021-04-18 12:32:10 +0300
committerGitHub <noreply@github.com>2021-04-18 12:32:10 +0300
commit3ecaf57b2940d733e92a285d5cff8c766d28f2e1 (patch)
tree20df2df0611c141f6f4cba0c26076e011532c171
parent67650104959003d1a5828f8d79ad72aa08752055 (diff)
downloadrust-3ecaf57b2940d733e92a285d5cff8c766d28f2e1.tar.gz
rust-3ecaf57b2940d733e92a285d5cff8c766d28f2e1.zip
Slightly change wording and fix typo in vec/mod.rs
-rw-r--r--library/alloc/src/vec/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs
index 0dab0358d6e..1b78356fde5 100644
--- a/library/alloc/src/vec/mod.rs
+++ b/library/alloc/src/vec/mod.rs
@@ -2041,7 +2041,7 @@ impl<T, A: Allocator> Vec<T, A> {
 
     /// Safety: changing returned .2 (&mut usize) is considered the same as calling `.set_len(_)`.
     ///
-    /// This method is used to have unique access to all vec parts at once in `extend_from_within`.
+    /// This method provides unique access to all vec parts at once in `extend_from_within`.
     unsafe fn split_at_spare_mut_with_len(
         &mut self,
     ) -> (&mut [T], &mut [MaybeUninit<T>], &mut usize) {
@@ -2279,7 +2279,7 @@ impl<T: Clone, A: Allocator> ExtendFromWithinSpec for Vec<T, A> {
         iter::zip(to_clone, spare)
             .map(|(src, dst)| dst.write(src.clone()))
             // Note:
-            // - Element was just initialized with `MaybeUninit::write`, so it's ok to increace len
+            // - Element was just initialized with `MaybeUninit::write`, so it's ok to increase len
             // - len is increased after each element to prevent leaks (see issue #82533)
             .for_each(|_| *len += 1);
     }