Skip to content

Commit 78e3d37

Browse files
discord9seanmonstar
authored andcommitted
make miri happy
1 parent 4f28cbd commit 78e3d37

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/header/map.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2098,22 +2098,22 @@ impl<'a, T> IterMut<'a, T> {
20982098
self.cursor = Some(Cursor::Head);
20992099
}
21002100

2101-
let entry = unsafe { &(*self.map).entries[self.entry] };
2101+
let entry = unsafe { &mut (*self.map).entries[self.entry] };
21022102

21032103
match self.cursor.unwrap() {
21042104
Head => {
21052105
self.cursor = entry.links.map(|l| Values(l.next));
2106-
Some((&entry.key, &entry.value as *const _ as *mut _))
2106+
Some((&entry.key, &mut entry.value as *mut _))
21072107
}
21082108
Values(idx) => {
2109-
let extra = unsafe { &(*self.map).extra_values[idx] };
2109+
let extra = unsafe { &mut (*self.map).extra_values[idx] };
21102110

21112111
match extra.next {
21122112
Link::Entry(_) => self.cursor = None,
21132113
Link::Extra(i) => self.cursor = Some(Values(i)),
21142114
}
21152115

2116-
Some((&entry.key, &extra.value as *const _ as *mut _))
2116+
Some((&entry.key, &mut extra.value as *mut _))
21172117
}
21182118
}
21192119
}

0 commit comments

Comments
 (0)