1
Fork 0

libcore: Remove ptr::mut_addr_of since &mut is coerced to *mut

This commit is contained in:
Luqman Aden 2013-02-14 19:00:04 -05:00 committed by Luqman Aden
parent af2f0ef088
commit cc89029942
7 changed files with 17 additions and 27 deletions

View file

@ -243,7 +243,7 @@ impl Path {
unsafe {
do str::as_c_str(self.to_str()) |buf| {
let mut st = stat::arch::default_stat();
let r = libc::stat(buf, ptr::mut_addr_of(&st));
let r = libc::stat(buf, &mut st);
if r == 0 { Some(move st) } else { None }
}
@ -255,7 +255,7 @@ impl Path {
unsafe {
do str::as_c_str(self.to_str()) |buf| {
let mut st = stat::arch::default_stat();
let r = libc::lstat(buf, ptr::mut_addr_of(&st));
let r = libc::lstat(buf, &mut st);
if r == 0 { Some(move st) } else { None }
}