@@ -187,7 +187,7 @@ impl System {
187
187
old_size => unsafe {
188
188
let new_ptr = self . alloc_impl ( new_layout, zeroed) ?;
189
189
ptr:: copy_nonoverlapping ( ptr. as_ptr ( ) , new_ptr. as_mut_ptr ( ) , old_size) ;
190
- Allocator :: deallocate ( & self , ptr, old_layout) ;
190
+ Allocator :: deallocate ( self , ptr, old_layout) ;
191
191
Ok ( new_ptr)
192
192
} ,
193
193
}
@@ -254,7 +254,7 @@ unsafe impl Allocator for System {
254
254
match new_layout. size ( ) {
255
255
// SAFETY: conditions must be upheld by the caller
256
256
0 => unsafe {
257
- Allocator :: deallocate ( & self , ptr, old_layout) ;
257
+ Allocator :: deallocate ( self , ptr, old_layout) ;
258
258
Ok ( NonNull :: slice_from_raw_parts ( new_layout. dangling ( ) , 0 ) )
259
259
} ,
260
260
@@ -274,9 +274,9 @@ unsafe impl Allocator for System {
274
274
// `new_ptr`. Thus, the call to `copy_nonoverlapping` is safe. The safety contract
275
275
// for `dealloc` must be upheld by the caller.
276
276
new_size => unsafe {
277
- let new_ptr = Allocator :: allocate ( & self , new_layout) ?;
277
+ let new_ptr = Allocator :: allocate ( self , new_layout) ?;
278
278
ptr:: copy_nonoverlapping ( ptr. as_ptr ( ) , new_ptr. as_mut_ptr ( ) , new_size) ;
279
- Allocator :: deallocate ( & self , ptr, old_layout) ;
279
+ Allocator :: deallocate ( self , ptr, old_layout) ;
280
280
Ok ( new_ptr)
281
281
} ,
282
282
}
0 commit comments