Issue 3223: make unsafe scopes tighter
This commit is contained in:
@@ -386,8 +386,6 @@ impl Atom {
|
||||
unsafe fn write_to_ptr(string: &str, ptr: *mut u8) {
|
||||
unsafe {
|
||||
ptr::write(ptr as *mut _, AtomHeader::build_with(string.len() as u64));
|
||||
}
|
||||
unsafe {
|
||||
let str_ptr = ptr.add(mem::size_of::<AtomHeader>());
|
||||
ptr::copy_nonoverlapping(string.as_ptr(), str_ptr, string.len());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user