mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +00:00
transmute moved to std::mem
This commit is contained in:
parent
4b9c8279ce
commit
bf26ea12b2
3 changed files with 5 additions and 5 deletions
|
@ -70,12 +70,12 @@ fn main() {
|
||||||
strconv::ExpNone,
|
strconv::ExpNone,
|
||||||
false, false);
|
false, false);
|
||||||
if res.is_some() {
|
if res.is_some() {
|
||||||
unsafe { std::cast::transmute(res.unwrap()) }
|
unsafe { std::mem::transmute(res.unwrap()) }
|
||||||
} else {
|
} else {
|
||||||
crash!(1, "no mode given");
|
crash!(1, "no mode given");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
unsafe { std::cast::transmute(0o755 as u32) }
|
unsafe { std::mem::transmute(0o755 as u32) }
|
||||||
};
|
};
|
||||||
|
|
||||||
let dirs = matches.free;
|
let dirs = matches.free;
|
||||||
|
|
|
@ -18,7 +18,7 @@ extern crate getopts;
|
||||||
extern crate libc;
|
extern crate libc;
|
||||||
|
|
||||||
use std::os;
|
use std::os;
|
||||||
use std::cast::transmute;
|
use std::mem::transmute;
|
||||||
use std::io::{print, File};
|
use std::io::{print, File};
|
||||||
use std::ptr::null;
|
use std::ptr::null;
|
||||||
use std::from_str::from_str;
|
use std::from_str::from_str;
|
||||||
|
|
|
@ -20,7 +20,7 @@ extern crate getopts;
|
||||||
extern crate libc;
|
extern crate libc;
|
||||||
|
|
||||||
use std::io::print;
|
use std::io::print;
|
||||||
use std::cast;
|
use std::mem;
|
||||||
use std::os;
|
use std::os;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use std::str;
|
use std::str;
|
||||||
|
@ -103,7 +103,7 @@ fn exec(filename: &str) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*line).ut_type == USER_PROCESS {
|
if (*line).ut_type == USER_PROCESS {
|
||||||
let user = str::raw::from_c_str(cast::transmute(&(*line).ut_user));
|
let user = str::raw::from_c_str(mem::transmute(&(*line).ut_user));
|
||||||
users.push(user);
|
users.push(user);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue