Skip to content

Commit c2f8bb7

Browse files
committed
unistd: Mark fork() and related methods as #[inline]
1 parent c2acb9e commit c2f8bb7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/unistd.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,21 @@ pub enum ForkResult {
2020
}
2121

2222
impl ForkResult {
23+
#[inline]
2324
pub fn is_child(&self) -> bool {
2425
match *self {
2526
ForkResult::Child => true,
2627
_ => false
2728
}
2829
}
2930

31+
#[inline]
3032
pub fn is_parent(&self) -> bool {
3133
!self.is_child()
3234
}
3335
}
3436

37+
#[inline]
3538
pub fn fork() -> Result<ForkResult> {
3639
use self::ForkResult::*;
3740
let res = unsafe { libc::fork() };

0 commit comments

Comments
 (0)