mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 09:26:29 +03:00
clippy
This commit is contained in:
@@ -385,7 +385,7 @@ impl Chatlist {
|
|||||||
ret.text2 = None;
|
ret.text2 = None;
|
||||||
} else if lastmsg.is_none() || lastmsg.as_ref().unwrap().from_id == DC_CONTACT_ID_UNDEFINED
|
} else if lastmsg.is_none() || lastmsg.as_ref().unwrap().from_id == DC_CONTACT_ID_UNDEFINED
|
||||||
{
|
{
|
||||||
ret.text2 = Some(stock_str::no_messages(context).await.to_string());
|
ret.text2 = Some(stock_str::no_messages(context).await);
|
||||||
} else {
|
} else {
|
||||||
ret.fill(&mut lastmsg.unwrap(), chat, lastcontact.as_ref(), context)
|
ret.fill(&mut lastmsg.unwrap(), chat, lastcontact.as_ref(), context)
|
||||||
.await;
|
.await;
|
||||||
|
|||||||
@@ -1289,7 +1289,7 @@ async fn create_or_lookup_group(
|
|||||||
// After all, the sender has a reference/in-reply-to that
|
// After all, the sender has a reference/in-reply-to that
|
||||||
// points to this chat.
|
// points to this chat.
|
||||||
let s = stock_str::unknown_sender_for_chat(context).await;
|
let s = stock_str::unknown_sender_for_chat(context).await;
|
||||||
mime_parser.repl_msg_by_error(s.to_string());
|
mime_parser.repl_msg_by_error(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if the group does not exist but should be created
|
// check if the group does not exist but should be created
|
||||||
@@ -2633,11 +2633,7 @@ mod tests {
|
|||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
last_msg.text,
|
last_msg.text,
|
||||||
Some(
|
Some(stock_str::failed_sending_to(&t, "assidhfaaspocwaeofi@gmail.com").await,)
|
||||||
stock_str::failed_sending_to(&t, "assidhfaaspocwaeofi@gmail.com")
|
|
||||||
.await
|
|
||||||
.to_string(),
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
assert_eq!(last_msg.from_id, DC_CONTACT_ID_INFO);
|
assert_eq!(last_msg.from_id, DC_CONTACT_ID_INFO);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -195,11 +195,7 @@ impl ChatId {
|
|||||||
}
|
}
|
||||||
self.inner_set_ephemeral_timer(context, timer).await?;
|
self.inner_set_ephemeral_timer(context, timer).await?;
|
||||||
let mut msg = Message::new(Viewtype::Text);
|
let mut msg = Message::new(Viewtype::Text);
|
||||||
msg.text = Some(
|
msg.text = Some(stock_ephemeral_timer_changed(context, timer, DC_CONTACT_ID_SELF).await);
|
||||||
stock_ephemeral_timer_changed(context, timer, DC_CONTACT_ID_SELF)
|
|
||||||
.await
|
|
||||||
.to_string(),
|
|
||||||
);
|
|
||||||
msg.param.set_cmd(SystemMessage::EphemeralTimerChanged);
|
msg.param.set_cmd(SystemMessage::EphemeralTimerChanged);
|
||||||
if let Err(err) = send_msg(context, self, &mut msg).await {
|
if let Err(err) = send_msg(context, self, &mut msg).await {
|
||||||
error!(
|
error!(
|
||||||
|
|||||||
@@ -895,7 +895,6 @@ impl Context {
|
|||||||
ProtectionStatus::Unprotected => protection_enabled(self, from_id).await,
|
ProtectionStatus::Unprotected => protection_enabled(self, from_id).await,
|
||||||
ProtectionStatus::Protected => protection_disabled(self, from_id).await,
|
ProtectionStatus::Protected => protection_disabled(self, from_id).await,
|
||||||
}
|
}
|
||||||
.to_string()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) async fn update_device_chats(&self) -> Result<(), Error> {
|
pub(crate) async fn update_device_chats(&self) -> Result<(), Error> {
|
||||||
|
|||||||
Reference in New Issue
Block a user