diff options
| author | Jacob Kiesel <kieseljake@gmail.com> | 2018-02-08 08:27:53 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-08 08:27:53 -0700 |
| commit | a67749ae87b1c873ed09fca2a204beff2fe5e7ea (patch) | |
| tree | 8570f9041bc14eb1e0a2a228cb7cf0a8b46d72be /src | |
| parent | 2a4c0185187dd40683697932c57af608062cb320 (diff) | |
| download | rust-a67749ae87b1c873ed09fca2a204beff2fe5e7ea.tar.gz rust-a67749ae87b1c873ed09fca2a204beff2fe5e7ea.zip | |
Swap `ptr::read` for `ptr::drop_in_place`
Diffstat (limited to 'src')
| -rw-r--r-- | src/liballoc/vec.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index a906628dbc7..41ba8e12105 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -814,7 +814,7 @@ impl<T> Vec<T> { if !f(&v[i]) { del += 1; unsafe { - ptr::read(&v[i]); + ptr::drop_in_place(&mut v[i]); } } else if del > 0 { let src: *const T = &v[i]; |
