diff options
| author | bors <bors@rust-lang.org> | 2014-09-24 17:30:51 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-09-24 17:30:51 +0000 |
| commit | e0bd16c5ec7ff4c5445fa3991bd679b4d7d4e966 (patch) | |
| tree | f855c7357e64b9e1b6ce5924c95f291c5c21e623 /src/libstd | |
| parent | 9e3bf02c381c9d4dd6b5ace6815febab3b89fecf (diff) | |
| parent | cef86613db6d7502e4649c873c1014ff6fa8a1c8 (diff) | |
| download | rust-e0bd16c5ec7ff4c5445fa3991bd679b4d7d4e966.tar.gz rust-e0bd16c5ec7ff4c5445fa3991bd679b4d7d4e966.zip | |
auto merge of #17477 : vhbit/rust/ios-deprecation-fix, r=alexcrichton
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/os.rs | 4 | ||||
| -rw-r--r-- | src/libstd/rt/backtrace.rs | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/libstd/os.rs b/src/libstd/os.rs index 81dd114ec7d..478a40f17b0 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -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()) } } diff --git a/src/libstd/rt/backtrace.rs b/src/libstd/rt/backtrace.rs index de5c26e03a3..aa9505d83fc 100644 --- a/src/libstd/rt/backtrace.rs +++ b/src/libstd/rt/backtrace.rs @@ -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"))] |
