auto merge of #17477 : vhbit/rust/ios-deprecation-fix, r=alexcrichton

This commit is contained in:
bors 2014-09-24 17:30:51 +00:00
commit e0bd16c5ec
2 changed files with 4 additions and 5 deletions

View File

@ -1173,9 +1173,7 @@ fn real_args_as_bytes() -> Vec<Vec<u8>> {
let utf_c_str: *const libc::c_char =
mem::transmute(objc_msgSend(tmp, utf8Sel));
let s = CString::new(utf_c_str, false);
if s.is_not_null() {
res.push(s.as_bytes_no_nul().to_vec())
}
res.push(s.as_bytes_no_nul().to_vec())
}
}

View File

@ -278,9 +278,10 @@ mod imp {
let cnt = unsafe { backtrace(buf.as_mut_ptr(), SIZE as libc::c_int) as uint};
// skipping the first one as it is write itself
result::fold_(range(1, cnt).map(|i| {
let iter = range(1, cnt).map(|i| {
print(w, i as int, buf[i])
}))
});
result::fold(iter, (), |_, _| ())
}
#[cfg(not(target_os = "ios", target_arch = "arm"))]