Make use of [wrapping_]byte_{add,sub}
...replacing `.cast().wrapping_offset().cast()` & similar code.
This commit is contained in:
parent
1cff564203
commit
53565b23ac
10 changed files with 17 additions and 18 deletions
|
@ -650,7 +650,7 @@ fn thin_box() {
|
|||
.unwrap_or_else(|| handle_alloc_error(layout))
|
||||
.cast::<DynMetadata<T>>();
|
||||
ptr.as_ptr().write(meta);
|
||||
ptr.cast::<u8>().as_ptr().add(offset).cast::<Value>().write(value);
|
||||
ptr.as_ptr().byte_add(offset).cast::<Value>().write(value);
|
||||
Self { ptr, phantom: PhantomData }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue