all: use let chains
This commit is contained in:
parent
3d5d146d65
commit
286857971a
89 changed files with 1516 additions and 1574 deletions
|
|
@ -30,10 +30,10 @@ impl AsyncEvent {
|
|||
}
|
||||
|
||||
pub fn trigger(&self) {
|
||||
if self.triggers.fetch_add(1) == 0 {
|
||||
if let Some(waker) = self.waker.take() {
|
||||
waker.wake();
|
||||
}
|
||||
if self.triggers.fetch_add(1) == 0
|
||||
&& let Some(waker) = self.waker.take()
|
||||
{
|
||||
waker.wake();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue