chore: fix Rust 1.74 clippy warning

This commit is contained in:
link2xt
2023-11-19 21:40:19 +00:00
parent 09d4b4354a
commit e011f8f42f

View File

@@ -2623,19 +2623,17 @@ async fn test_incoming_contact_request() -> Result<()> {
let chat = chat::Chat::load_from_db(&t, msg.chat_id).await?; let chat = chat::Chat::load_from_db(&t, msg.chat_id).await?;
assert!(chat.is_contact_request()); assert!(chat.is_contact_request());
loop { let event = t
let event = t .evtracker
.evtracker .get_matching(|evt| matches!(evt, EventType::IncomingMsg { .. }))
.get_matching(|evt| matches!(evt, EventType::IncomingMsg { .. })) .await;
.await; match event {
match event { EventType::IncomingMsg { chat_id, msg_id } => {
EventType::IncomingMsg { chat_id, msg_id } => { assert_eq!(msg.chat_id, chat_id);
assert_eq!(msg.chat_id, chat_id); assert_eq!(msg.id, msg_id);
assert_eq!(msg.id, msg_id); Ok(())
return Ok(());
}
_ => unreachable!(),
} }
_ => unreachable!(),
} }
} }