From e011f8f42f0489e3d12b1d9ea916201c0fa98253 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sun, 19 Nov 2023 21:40:19 +0000 Subject: [PATCH] chore: fix Rust 1.74 clippy warning --- src/receive_imf/tests.rs | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/receive_imf/tests.rs b/src/receive_imf/tests.rs index 646036388..cad034c6e 100644 --- a/src/receive_imf/tests.rs +++ b/src/receive_imf/tests.rs @@ -2623,19 +2623,17 @@ async fn test_incoming_contact_request() -> Result<()> { let chat = chat::Chat::load_from_db(&t, msg.chat_id).await?; assert!(chat.is_contact_request()); - loop { - let event = t - .evtracker - .get_matching(|evt| matches!(evt, EventType::IncomingMsg { .. })) - .await; - match event { - EventType::IncomingMsg { chat_id, msg_id } => { - assert_eq!(msg.chat_id, chat_id); - assert_eq!(msg.id, msg_id); - return Ok(()); - } - _ => unreachable!(), + let event = t + .evtracker + .get_matching(|evt| matches!(evt, EventType::IncomingMsg { .. })) + .await; + match event { + EventType::IncomingMsg { chat_id, msg_id } => { + assert_eq!(msg.chat_id, chat_id); + assert_eq!(msg.id, msg_id); + Ok(()) } + _ => unreachable!(), } }