1
Fork 0

Minor fixups to fix tidy errors

This commit is contained in:
Alex Crichton 2017-03-15 07:58:27 -07:00
parent a8f4a1bd98
commit 1241a88fa9
7 changed files with 9 additions and 16 deletions

View file

@ -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 _),
}
}
}