about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-03-15 07:58:27 -0700
committerAlex Crichton <alex@alexcrichton.com>2017-03-17 13:28:53 -0700
commit1241a88fa9ddf5e645d1e6e93e04c435bbf15cd4 (patch)
tree987da130316d1be22082895a02b1adb6cb35e677 /src/liballoc
parenta8f4a1bd984091ffb8f87f9440e2483f94b44a20 (diff)
downloadrust-1241a88fa9ddf5e645d1e6e93e04c435bbf15cd4.tar.gz
rust-1241a88fa9ddf5e645d1e6e93e04c435bbf15cd4.zip
Minor fixups to fix tidy errors
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/arc.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs
index b6191c4d43e..1d616233881 100644
--- a/src/liballoc/arc.rs
+++ b/src/liballoc/arc.rs
@@ -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 _),
+        }
     }
 }