Skip to content
Snippets Groups Projects
Commit 4ddbd405 authored by Emilio Cobos Álvarez's avatar Emilio Cobos Álvarez
Browse files

Bug 1843076 - Use data_mut in HeaderSlice::drop(), a=dsmith

Tentative, but it is more correct and made miri happier.

Differential Revision: https://phabricator.services.mozilla.com/D183625
parent ad638605
No related branches found
No related tags found
No related merge requests found
......@@ -672,7 +672,7 @@ impl<H: PartialEq, T: PartialEq> PartialEq for HeaderSlice<H, T> {
impl<H, T> Drop for HeaderSlice<H, T> {
fn drop(&mut self) {
unsafe {
let mut ptr = self.data.as_mut_ptr();
let mut ptr = self.data_mut();
for _ in 0..self.len {
std::ptr::drop_in_place(ptr);
ptr = ptr.offset(1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment