We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 47e749e + 46b2c9a commit ba568a0Copy full SHA for ba568a0
src/libstd/os.rs
@@ -595,7 +595,7 @@ fn real_args_as_bytes() -> Vec<Vec<u8>> {
595
// res
596
#[cfg(target_os = "ios")]
597
fn real_args_as_bytes() -> Vec<Vec<u8>> {
598
- use ffi::c_str_to_bytes;
+ use ffi::CStr;
599
use iter::range;
600
use mem;
601
@@ -630,7 +630,7 @@ fn real_args_as_bytes() -> Vec<Vec<u8>> {
630
let tmp = objc_msgSend(args, objectAtSel, i);
631
let utf_c_str: *const libc::c_char =
632
mem::transmute(objc_msgSend(tmp, utf8Sel));
633
- res.push(c_str_to_bytes(&utf_c_str).to_vec());
+ res.push(CStr::from_ptr(utf_c_str).to_bytes().to_vec());
634
}
635
636
0 commit comments