all: use let chains
This commit is contained in:
parent
3d5d146d65
commit
286857971a
89 changed files with 1516 additions and 1574 deletions
|
|
@ -243,12 +243,12 @@ impl ForkerProxy {
|
|||
true => Ok((io.pop_fd().unwrap(), pid)),
|
||||
_ => Err(ForkerError::PidfdForkFailed),
|
||||
};
|
||||
if let Some(handoff) = self.pending_pidfds.remove(&id) {
|
||||
if let Some(handoff) = handoff.upgrade() {
|
||||
handoff.pidfd.set(Some(res));
|
||||
if let Some(w) = handoff.waiter.take() {
|
||||
w.wake();
|
||||
}
|
||||
if let Some(handoff) = self.pending_pidfds.remove(&id)
|
||||
&& let Some(handoff) = handoff.upgrade()
|
||||
{
|
||||
handoff.pidfd.set(Some(res));
|
||||
if let Some(w) = handoff.waiter.take() {
|
||||
w.wake();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue