Minor fixups to fix tidy errors
This commit is contained in:
parent
a8f4a1bd98
commit
1241a88fa9
7 changed files with 9 additions and 16 deletions
|
@ -332,7 +332,10 @@ impl<T> Arc<T> {
|
|||
pub unsafe fn from_raw(ptr: *const T) -> Self {
|
||||
// To find the corresponding pointer to the `ArcInner` we need to subtract the offset of the
|
||||
// `data` field from the pointer.
|
||||
Arc { ptr: Shared::new((ptr as *const u8).offset(-offset_of!(ArcInner<T>, data)) as *const _) }
|
||||
let ptr = (ptr as *const u8).offset(-offset_of!(ArcInner<T>, data));
|
||||
Arc {
|
||||
ptr: Shared::new(ptr as *const _),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue