Fix argument to copy_nonoverlapping in internal_macros
This resolves a segfault due to unsafe code.
This commit is contained in:
parent
01e164025a
commit
9052f3b5a2
|
@ -88,7 +88,7 @@ macro_rules! impl_array_newtype {
|
||||||
let mut ret: $thing = mem::uninitialized();
|
let mut ret: $thing = mem::uninitialized();
|
||||||
copy_nonoverlapping(data.as_ptr(),
|
copy_nonoverlapping(data.as_ptr(),
|
||||||
ret.as_mut_ptr(),
|
ret.as_mut_ptr(),
|
||||||
mem::size_of::<$thing>());
|
$len);
|
||||||
ret
|
ret
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue