Skip to content

Commit 4416cae

Browse files
committed
Auto merge of rust-lang#84294 - WaffleLapkin:patch-2, r=jonas-schievink
Slightly change wording in doc comment and fix typo in vec/mod.rs Suggested by `@pickfire` in rust-lang#82760
2 parents 4950b9d + 7fcaabb commit 4416cae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: alloc/src/vec/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2041,7 +2041,7 @@ impl<T, A: Allocator> Vec<T, A> {
20412041

20422042
/// Safety: changing returned .2 (&mut usize) is considered the same as calling `.set_len(_)`.
20432043
///
2044-
/// This method is used to have unique access to all vec parts at once in `extend_from_within`.
2044+
/// This method provides unique access to all vec parts at once in `extend_from_within`.
20452045
unsafe fn split_at_spare_mut_with_len(
20462046
&mut self,
20472047
) -> (&mut [T], &mut [MaybeUninit<T>], &mut usize) {
@@ -2279,7 +2279,7 @@ impl<T: Clone, A: Allocator> ExtendFromWithinSpec for Vec<T, A> {
22792279
iter::zip(to_clone, spare)
22802280
.map(|(src, dst)| dst.write(src.clone()))
22812281
// Note:
2282-
// - Element was just initialized with `MaybeUninit::write`, so it's ok to increace len
2282+
// - Element was just initialized with `MaybeUninit::write`, so it's ok to increase len
22832283
// - len is increased after each element to prevent leaks (see issue #82533)
22842284
.for_each(|_| *len += 1);
22852285
}

0 commit comments

Comments
 (0)