File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
crates/slacc-system-metrics/src Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ pub(crate) unsafe fn get_disk_io() -> Result<DiskInformation, SlaccStatsError> {
231
231
232
232
IOObjectRelease ( parent) ;
233
233
IOObjectRelease ( item) ;
234
- CFRelease ( props_dictionary as * const _ as * const :: libc :: c_void ) ;
234
+ CFRelease ( props_dictionary as * const _ ) ;
235
235
item = IOIteratorNext ( iterator) ;
236
236
}
237
237
@@ -247,13 +247,13 @@ pub(crate) unsafe fn get_memory_info() -> Result<MemoryInformation, SlaccStatsEr
247
247
let mut memory_size: u64 = 0 ;
248
248
let mut command = [ libc:: CTL_HW , libc:: HW_PAGESIZE ] ;
249
249
let host_port = libc:: mach_host_self ( ) ;
250
- let mut statistic = MaybeUninit :: < :: libc:: vm_statistics64 > :: uninit ( ) ;
250
+ let mut statistic = std :: mem :: zeroed :: < :: libc:: vm_statistics64 > ( ) ;
251
251
let mut statistic_count = libc:: HOST_VM_INFO64_COUNT ;
252
252
253
253
libc:: host_statistics64 (
254
254
host_port,
255
255
libc:: HOST_VM_INFO64 ,
256
- statistic. as_mut_ptr ( ) as * mut i32 ,
256
+ & raw mut statistic as * mut i32 ,
257
257
& mut statistic_count,
258
258
)
259
259
. into_errno ( ) ?;
@@ -269,7 +269,6 @@ pub(crate) unsafe fn get_memory_info() -> Result<MemoryInformation, SlaccStatsEr
269
269
. into_errno ( ) ?;
270
270
271
271
command = [ libc:: CTL_HW , libc:: HW_MEMSIZE ] ;
272
- let statistic = statistic. assume_init ( ) ;
273
272
274
273
libc:: sysctl (
275
274
command. as_mut_ptr ( ) ,
You can’t perform that action at this time.
0 commit comments