Skip to content

Commit e0bd16c

Browse files
committed
auto merge of #17477 : vhbit/rust/ios-deprecation-fix, r=alexcrichton
2 parents 9e3bf02 + cef8661 commit e0bd16c

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/libstd/os.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1173,9 +1173,7 @@ fn real_args_as_bytes() -> Vec<Vec<u8>> {
11731173
let utf_c_str: *const libc::c_char =
11741174
mem::transmute(objc_msgSend(tmp, utf8Sel));
11751175
let s = CString::new(utf_c_str, false);
1176-
if s.is_not_null() {
1177-
res.push(s.as_bytes_no_nul().to_vec())
1178-
}
1176+
res.push(s.as_bytes_no_nul().to_vec())
11791177
}
11801178
}
11811179

src/libstd/rt/backtrace.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,10 @@ mod imp {
278278
let cnt = unsafe { backtrace(buf.as_mut_ptr(), SIZE as libc::c_int) as uint};
279279

280280
// skipping the first one as it is write itself
281-
result::fold_(range(1, cnt).map(|i| {
281+
let iter = range(1, cnt).map(|i| {
282282
print(w, i as int, buf[i])
283-
}))
283+
});
284+
result::fold(iter, (), |_, _| ())
284285
}
285286

286287
#[cfg(not(target_os = "ios", target_arch = "arm"))]

0 commit comments

Comments
 (0)