mirror of
https://github.com/uutils/coreutils
synced 2024-11-17 10:18:11 +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…
Reference in a new issue