Skip to content

Commit 29472a3

Browse files
committed
Formatting with rustfmt
1 parent 73f9877 commit 29472a3

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/sys/wait.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub enum WaitStatus {
8383
/// child process. This is only returned if `WaitPidFlag::WNOHANG`
8484
/// was used (otherwise `wait()` or `waitpid()` would block until
8585
/// there was something to report).
86-
StillAlive
86+
StillAlive,
8787
}
8888

8989
impl WaitStatus {
@@ -149,7 +149,7 @@ fn continued(status: i32) -> bool {
149149
unsafe { libc::WIFCONTINUED(status) }
150150
}
151151

152-
fn decode(pid : Pid, status: i32) -> WaitStatus {
152+
fn decode(pid: Pid, status: i32) -> WaitStatus {
153153
if exited(status) {
154154
WaitStatus::Exited(pid, exit_status(status))
155155
} else if signaled(status) {
@@ -187,10 +187,16 @@ pub fn waitpid<P: Into<Option<Pid>>>(pid: P, options: Option<WaitPidFlag>) -> Re
187187

188188
let option_bits = match options {
189189
Some(bits) => bits.bits(),
190-
None => 0
190+
None => 0,
191191
};
192192

193-
let res = unsafe { libc::waitpid(pid.into().unwrap_or(Pid::from_raw(-1)).into(), &mut status as *mut c_int, option_bits) };
193+
let res = unsafe {
194+
libc::waitpid(
195+
pid.into().unwrap_or(Pid::from_raw(-1)).into(),
196+
&mut status as *mut c_int,
197+
option_bits,
198+
)
199+
};
194200

195201
Ok(match try!(Errno::result(res)) {
196202
0 => StillAlive,

0 commit comments

Comments
 (0)