add missing unsafe block

The // SAFETY comment already exists -- only the unsafe { .. } was
omitted.
This commit is contained in:
Dustin J. Mitchell 2022-05-27 23:15:33 +00:00 committed by Tomas Babej
parent e6470f463f
commit e5b23ef9a0

View file

@ -314,7 +314,7 @@ where
// - list is properly aligned, dereferencable, and points to an initialized CL, since it is valid
// - the lifetime of the resulting reference is limited to this function, during which time
// nothing else refers to this memory.
let slice = list.as_mut().unwrap().slice();
let slice = unsafe { list.as_mut() }.unwrap().slice();
if let Some(elt_ref) = slice.get_mut(index) {
let mut rv = None;
if let Some(elt) = elt_ref.as_mut() {