@@ -274,7 +274,10 @@ impl<T> RawVec<T> {
274274 let ptr = if self . cap == 0 {
275275 heap:: allocate ( new_alloc_size, align)
276276 } else {
277- heap:: reallocate ( self . ptr ( ) as * mut _ , self . cap * elem_size, new_alloc_size, align)
277+ heap:: reallocate ( self . ptr ( ) as * mut _ ,
278+ self . cap * elem_size,
279+ new_alloc_size,
280+ align)
278281 } ;
279282
280283 // If allocate or reallocate fail, we'll get `null` back
@@ -358,7 +361,10 @@ impl<T> RawVec<T> {
358361 let ptr = if self . cap == 0 {
359362 heap:: allocate ( new_alloc_size, align)
360363 } else {
361- heap:: reallocate ( self . ptr ( ) as * mut _ , self . cap * elem_size, new_alloc_size, align)
364+ heap:: reallocate ( self . ptr ( ) as * mut _ ,
365+ self . cap * elem_size,
366+ new_alloc_size,
367+ align)
362368 } ;
363369
364370 // If allocate or reallocate fail, we'll get `null` back
@@ -392,7 +398,8 @@ impl<T> RawVec<T> {
392398 }
393399
394400 // This check is my waterloo; it's the only thing Vec wouldn't have to do.
395- assert ! ( self . cap >= amount, "Tried to shrink to a larger capacity" ) ;
401+ assert ! ( self . cap >= amount,
402+ "Tried to shrink to a larger capacity" ) ;
396403
397404 if amount == 0 {
398405 mem:: replace ( self , RawVec :: new ( ) ) ;
@@ -466,6 +473,7 @@ impl<T> Drop for RawVec<T> {
466473#[ inline]
467474fn alloc_guard ( alloc_size : usize ) {
468475 if core:: usize:: BITS < 64 {
469- assert ! ( alloc_size <= :: core:: isize :: MAX as usize , "capacity overflow" ) ;
476+ assert ! ( alloc_size <= :: core:: isize :: MAX as usize ,
477+ "capacity overflow" ) ;
470478 }
471479}
0 commit comments