diff --git a/src/sync/waker_set.rs b/src/sync/waker_set.rs index 57fbaaa..a10f214 100644 --- a/src/sync/waker_set.rs +++ b/src/sync/waker_set.rs @@ -74,9 +74,8 @@ impl WakerSet { pub fn remove(&self, key: usize) { let mut inner = self.lock(); - match inner.entries.remove(key) { - Some(_) => inner.notifiable -= 1, - None => {} + if let Some(_) = inner.entries.remove(key) { + inner.notifiable -= 1; } }