diff options
| author | bors <bors@rust-lang.org> | 2021-04-19 11:55:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-04-19 11:55:52 +0000 |
| commit | 41f0e13bc53396852f4f1338ce5d8be0d1125b08 (patch) | |
| tree | fa15877d6df22f364067a01562d5c1055c0849f5 | |
| parent | 62652865b6029b4776a7c03efa13a37b15c9b953 (diff) | |
| parent | 3ecaf57b2940d733e92a285d5cff8c766d28f2e1 (diff) | |
| download | rust-41f0e13bc53396852f4f1338ce5d8be0d1125b08.tar.gz rust-41f0e13bc53396852f4f1338ce5d8be0d1125b08.zip | |
Auto merge of #84294 - WaffleLapkin:patch-2, r=jonas-schievink
Slightly change wording in doc comment and fix typo in vec/mod.rs Suggested by `@pickfire` in https://github.com/rust-lang/rust/pull/82760
| -rw-r--r-- | library/alloc/src/vec/mod.rs | 4 |
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); } |
