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 {
71
71
c:: HeapFree ( c:: GetProcessHeap ( ) , 0 , header. 0 as c:: LPVOID )
72
72
}
73
73
} ;
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 ( ) } ) ;
75
75
}
76
76
77
77
#[ inline]
78
78
unsafe fn realloc ( & self , ptr : * mut u8 , layout : Layout , new_size : usize ) -> * mut u8 {
79
79
if layout. align ( ) <= MIN_ALIGN {
80
80
// SAFETY: HeapReAlloc is safe if ptr was allocated by this allocator
81
81
// 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 }
85
83
} else {
86
84
// 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) }
90
86
}
91
87
}
92
88
}
You can’t perform that action at this time.
0 commit comments