Skip to content

Commit ecd0954

Browse files
committed
Formatting with rustfmt
1 parent e43d7db commit ecd0954

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
@@ -95,7 +95,7 @@ pub enum WaitStatus {
9595
/// child process. This is only returned if `WaitPidFlag::WNOHANG`
9696
/// was used (otherwise `wait()` or `waitpid()` would block until
9797
/// there was something to report).
98-
StillAlive
98+
StillAlive,
9999
}
100100

101101
impl WaitStatus {
@@ -161,7 +161,7 @@ fn continued(status: i32) -> bool {
161161
unsafe { libc::WIFCONTINUED(status) }
162162
}
163163

164-
fn decode(pid : Pid, status: i32) -> WaitStatus {
164+
fn decode(pid: Pid, status: i32) -> WaitStatus {
165165
if exited(status) {
166166
WaitStatus::Exited(pid, exit_status(status))
167167
} else if signaled(status) {
@@ -199,10 +199,16 @@ pub fn waitpid<P: Into<Option<Pid>>>(pid: P, options: Option<WaitPidFlag>) -> Re
199199

200200
let option_bits = match options {
201201
Some(bits) => bits.bits(),
202-
None => 0
202+
None => 0,
203203
};
204204

205-
let res = unsafe { libc::waitpid(pid.into().unwrap_or(Pid::from_raw(-1)).into(), &mut status as *mut c_int, option_bits) };
205+
let res = unsafe {
206+
libc::waitpid(
207+
pid.into().unwrap_or(Pid::from_raw(-1)).into(),
208+
&mut status as *mut c_int,
209+
option_bits,
210+
)
211+
};
206212

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

0 commit comments

Comments
 (0)