File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
library/std/src/sys/windows Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -71,22 +71,18 @@ unsafe impl GlobalAlloc for System {
7171 c:: HeapFree ( c:: GetProcessHeap ( ) , 0 , header. 0 as c:: LPVOID )
7272 }
7373 } ;
74- debug_assert ! ( err != 0 , "Failed to free heap memory: {}" , unsafe { c:: GetLastError ( ) } ) ;
74+ debug_assert ! ( err != 0 , "Failed to free heap memory: {}" , unsafe { c:: GetLastError ( ) } ) ;
7575 }
7676
7777 #[ inline]
7878 unsafe fn realloc ( & self , ptr : * mut u8 , layout : Layout , new_size : usize ) -> * mut u8 {
7979 if layout. align ( ) <= MIN_ALIGN {
8080 // SAFETY: HeapReAlloc is safe if ptr was allocated by this allocator
8181 // and new_size is not 0.
82- unsafe {
83- c:: HeapReAlloc ( c:: GetProcessHeap ( ) , 0 , ptr as c:: LPVOID , new_size) as * mut u8
84- }
82+ unsafe { c:: HeapReAlloc ( c:: GetProcessHeap ( ) , 0 , ptr as c:: LPVOID , new_size) as * mut u8 }
8583 } else {
8684 // SAFETY: The safety contract for `realloc_fallback` must be upheld by the caller
87- unsafe {
88- realloc_fallback ( self , ptr, layout, new_size)
89- }
85+ unsafe { realloc_fallback ( self , ptr, layout, new_size) }
9086 }
9187 }
9288}
You can’t perform that action at this time.
0 commit comments