Skip to content

Commit f3cbee3

Browse files
committed
fix & fmt
squash
1 parent b786cb0 commit f3cbee3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/message.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
33
use std::collections::BTreeSet;
44
use std::collections::HashSet;
5-
use std::collections::VecDeque;
65
use std::path::{Path, PathBuf};
76
use std::str;
87

@@ -1819,7 +1818,7 @@ pub async fn delete_msgs_ex(
18191818

18201819
let (info_msg_ids, info_msg_rfc724): (Vec<MsgId>, Vec<_>) =
18211820
deleted_info_msgs.into_iter().unzip();
1822-
if info_msg_rfc724.len() > 0 && modified_chat_ids.len() > 1 {
1821+
if !info_msg_rfc724.is_empty() && modified_chat_ids.len() > 1 {
18231822
bail!("Can delete only from same chat.");
18241823
}
18251824

@@ -1843,7 +1842,7 @@ pub async fn delete_msgs_ex(
18431842
.await?;
18441843
}
18451844

1846-
for &msg_id in info_msg_ids.iter() {
1845+
for &msg_id in &info_msg_ids {
18471846
let msg = Message::load_from_db(context, msg_id).await?;
18481847
delete_msg_locally(context, &msg).await?;
18491848
}
@@ -1862,7 +1861,7 @@ pub async fn delete_msgs_ex(
18621861

18631862
async fn send_delete_request(
18641863
context: &Context,
1865-
deleted_rfc724_mid: &Vec<String>,
1864+
deleted_rfc724_mid: &[String],
18661865
chat_id: &ChatId,
18671866
) -> Result<(), anyhow::Error> {
18681867
let mut msg = Message::new_text("🚮".to_owned());

0 commit comments

Comments
 (0)