diff options
| author | Waffle Lapkin <waffle.lapkin@gmail.com> | 2021-03-03 20:04:20 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-03 20:04:20 +0300 |
| commit | 950f12119ef724156a9a4e17e1b375eb28c6af11 (patch) | |
| tree | 72dbd4fd8564c76bb59699fb2d86508444d96dba /library/alloc/src/vec | |
| parent | a1835bcb01fc345653fd9e9ce02b0d103032c58d (diff) | |
| download | rust-950f12119ef724156a9a4e17e1b375eb28c6af11.tar.gz rust-950f12119ef724156a9a4e17e1b375eb28c6af11.zip | |
Update library/alloc/src/vec/mod.rs
Co-authored-by: Ralf Jung <post@ralfj.de>
Diffstat (limited to 'library/alloc/src/vec')
| -rw-r--r-- | library/alloc/src/vec/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index ff401b33832..4b992d1756b 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -1950,7 +1950,7 @@ impl<T, A: Allocator> Vec<T, A> { // SAFETY: // - `ptr` is guaranteed to be valid for `len` elements - // - `spare_ptr` is pointing one element past the buffer, so it doesn't overlap with `initialized` slice + // - `spare_ptr` is pointing one element past the buffer, so it doesn't overlap with `initialized` unsafe { let initialized = slice::from_raw_parts_mut(ptr, self.len); let spare = slice::from_raw_parts_mut(spare_ptr, spare_len); |
