Skip to content

Commit

Permalink
Simpler return from clone.
Browse files Browse the repository at this point in the history
  • Loading branch information
xurtis committed Jul 6, 2018
1 parent 904df74 commit 6c34977
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/sched.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ pub fn clone(cb: CloneCb,
Box::into_raw(Box::new(cb)) as *mut c_void)
};

let pid = Errno::result(res).map(Pid::from_raw)?;
Ok(pid)
Errno::result(res).map(Pid::from_raw)
}

pub fn unshare(flags: CloneFlags) -> Result<()> {
Expand Down

0 comments on commit 6c34977

Please sign in to comment.