mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-04 15:07:47 +00:00
refactor/polish ~ fix cargo clippy
complaints (unneeded transmute)
This commit is contained in:
parent
f933c60a41
commit
aa2ed76846
1 changed files with 1 additions and 2 deletions
|
@ -85,10 +85,9 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
|||
#[cfg(unix)]
|
||||
fn print_loadavg() {
|
||||
use libc::c_double;
|
||||
use std::mem::transmute;
|
||||
|
||||
let mut avg: [c_double; 3] = [0.0; 3];
|
||||
let loads: i32 = unsafe { transmute(getloadavg(avg.as_mut_ptr(), 3)) };
|
||||
let loads: i32 = unsafe { getloadavg(avg.as_mut_ptr(), 3) };
|
||||
|
||||
if loads == -1 {
|
||||
println!();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue