refactor: Use Message::new_text() more (#6127)

Follow-up to https://github.com/deltachat/deltachat-core-rust/pull/6123
This commit is contained in:
Hocuri
2024-10-30 13:05:58 +01:00
committed by GitHub
parent 6abadac4bb
commit d6c2c863b7
24 changed files with 66 additions and 111 deletions

View File

@@ -730,8 +730,7 @@ impl TestContext {
/// [`TestContext::recv_msg`] with the returned [`SentMessage`] if it wants to receive
/// the message.
pub async fn send_text(&self, chat_id: ChatId, txt: &str) -> SentMessage<'_> {
let mut msg = Message::new(Viewtype::Text);
msg.text = txt.to_string();
let mut msg = Message::new_text(txt.to_string());
self.send_msg(chat_id, &mut msg).await
}