Skip to content

Commit 262365d

Browse files
authored
Rollup merge of rust-lang#75758 - bpangWR:master, r=Mark-Simulacrum
Fixes for VxWorks r? @alexcrichton
2 parents a89061f + 63a5dc1 commit 262365d

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

std/src/sys/vxworks/fd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl FileDesc {
5353
}
5454

5555
#[inline]
56-
fn is_read_vectored(&self) -> bool {
56+
pub fn is_read_vectored(&self) -> bool {
5757
true
5858
}
5959

std/src/sys/vxworks/process/process_common.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -351,28 +351,19 @@ impl ExitStatus {
351351
}
352352

353353
fn exited(&self) -> bool {
354-
/*unsafe*/
355-
{ libc::WIFEXITED(self.0) }
354+
libc::WIFEXITED(self.0)
356355
}
357356

358357
pub fn success(&self) -> bool {
359358
self.code() == Some(0)
360359
}
361360

362361
pub fn code(&self) -> Option<i32> {
363-
if self.exited() {
364-
Some(/*unsafe*/ { libc::WEXITSTATUS(self.0) })
365-
} else {
366-
None
367-
}
362+
if self.exited() { Some(libc::WEXITSTATUS(self.0)) } else { None }
368363
}
369364

370365
pub fn signal(&self) -> Option<i32> {
371-
if !self.exited() {
372-
Some(/*unsafe*/ { libc::WTERMSIG(self.0) })
373-
} else {
374-
None
375-
}
366+
if !self.exited() { Some(libc::WTERMSIG(self.0)) } else { None }
376367
}
377368
}
378369

std/src/sys/vxworks/thread_local_dtor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
#![unstable(feature = "thread_local_internals", issue = "none")]
33

44
pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) {
5-
use crate::sys_common::thread_local::register_dtor_fallback;
5+
use crate::sys_common::thread_local_dtor::register_dtor_fallback;
66
register_dtor_fallback(t, dtor);
77
}

0 commit comments

Comments
 (0)