diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2019-05-09 19:12:32 +0200 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2019-05-10 12:43:06 +0200 |
commit | db2f6aa8ca1f23f78a497cb7cc960ff99f23ac04 (patch) | |
tree | 58fae3d37299c0986141ba88a106066716a518a1 /components/servo_arc | |
parent | f429c28f23bb21812deb042bf50e4bf16b9e1f1b (diff) | |
download | servo-db2f6aa8ca1f23f78a497cb7cc960ff99f23ac04.tar.gz servo-db2f6aa8ca1f23f78a497cb7cc960ff99f23ac04.zip |
style: Rustfmt + build fix.
Diffstat (limited to 'components/servo_arc')
-rw-r--r-- | components/servo_arc/lib.rs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/components/servo_arc/lib.rs b/components/servo_arc/lib.rs index b7c179cd13f..f2f9fa00602 100644 --- a/components/servo_arc/lib.rs +++ b/components/servo_arc/lib.rs @@ -687,7 +687,10 @@ impl<H, T> Arc<HeaderSlice<H, [T]>> { } // We should have consumed the buffer exactly, maybe accounting // for some padding from the alignment. - debug_assert!((buffer.offset(size as isize) as usize - current as *mut u8 as usize) < align_of::<Self>()); + debug_assert!( + (buffer.offset(size as isize) as usize - current as *mut u8 as usize) < + align_of::<Self>() + ); } assert!( items.next().is_none(), @@ -792,7 +795,6 @@ pub struct ThinArc<H, T> { phantom: PhantomData<(H, T)>, } - impl<H: fmt::Debug, T: fmt::Debug> fmt::Debug for ThinArc<H, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fmt::Debug::fmt(self.deref(), f) @@ -909,7 +911,10 @@ impl<H, T> Clone for ThinArc<H, T> { impl<H, T> Drop for ThinArc<H, T> { #[inline] fn drop(&mut self) { - let _ = Arc::from_thin(ThinArc { ptr: self.ptr, phantom: PhantomData, }); + let _ = Arc::from_thin(ThinArc { + ptr: self.ptr, + phantom: PhantomData, + }); } } @@ -928,7 +933,9 @@ impl<H, T> Arc<HeaderSliceWithLength<H, [T]>> { let thin_ptr = fat_ptr as *mut [usize] as *mut usize; ThinArc { ptr: unsafe { - ptr::NonNull::new_unchecked(thin_ptr as *mut ArcInner<HeaderSliceWithLength<H, [T; 0]>>) + ptr::NonNull::new_unchecked( + thin_ptr as *mut ArcInner<HeaderSliceWithLength<H, [T; 0]>>, + ) }, phantom: PhantomData, } |