chore: use if let Event ♻️

This commit is contained in:
Dheepak Krishnamurthy 2022-04-27 15:49:36 -06:00
parent 2e726522fc
commit 4b386ce9d6

View file

@ -373,9 +373,8 @@ impl TaskwarriorTui {
pub async fn abort_event_loop(&mut self) -> Result<()> {
self.event_loop.abort.send(())?;
while let Some(event) = self.next().await {
match event {
Event::Closed => break,
_ => (),
if let Event::Closed = event {
break;
}
}
Ok(())