From 44508eb392d3818a9ea7bdaf8ebc8ca7722480f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kl=C3=A4hn?= Date: Mon, 12 Sep 2022 13:08:52 +0200 Subject: [PATCH] clippy fix --- src/webxdc.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/webxdc.rs b/src/webxdc.rs index f69083c54..71c292d14 100644 --- a/src/webxdc.rs +++ b/src/webxdc.rs @@ -427,13 +427,9 @@ impl Context { pub(crate) async fn flush_status_updates(&self) -> Result { let update_needed = get_busy_webxdc_instances(&self.sql).await?; - loop { - let (instance_id, first_serial, last_serial, descr) = - match self.pop_smtp_status_update().await? { - Some(res) => res, - None => break, - }; - + while let Some((instance_id, first_serial, last_serial, descr)) = + self.pop_smtp_status_update().await? + { if let Some(json) = self .render_webxdc_status_update_object(instance_id, Some((first_serial, last_serial))) .await?