2
2
3
3
use std:: collections:: BTreeSet ;
4
4
use std:: collections:: HashSet ;
5
- use std:: collections:: VecDeque ;
6
5
use std:: path:: { Path , PathBuf } ;
7
6
use std:: str;
8
7
@@ -1819,7 +1818,7 @@ pub async fn delete_msgs_ex(
1819
1818
1820
1819
let ( info_msg_ids, info_msg_rfc724) : ( Vec < MsgId > , Vec < _ > ) =
1821
1820
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 {
1823
1822
bail ! ( "Can delete only from same chat." ) ;
1824
1823
}
1825
1824
@@ -1843,7 +1842,7 @@ pub async fn delete_msgs_ex(
1843
1842
. await ?;
1844
1843
}
1845
1844
1846
- for & msg_id in info_msg_ids. iter ( ) {
1845
+ for & msg_id in & info_msg_ids {
1847
1846
let msg = Message :: load_from_db ( context, msg_id) . await ?;
1848
1847
delete_msg_locally ( context, & msg) . await ?;
1849
1848
}
@@ -1862,7 +1861,7 @@ pub async fn delete_msgs_ex(
1862
1861
1863
1862
async fn send_delete_request (
1864
1863
context : & Context ,
1865
- deleted_rfc724_mid : & Vec < String > ,
1864
+ deleted_rfc724_mid : & [ String ] ,
1866
1865
chat_id : & ChatId ,
1867
1866
) -> Result < ( ) , anyhow:: Error > {
1868
1867
let mut msg = Message :: new_text ( "🚮" . to_owned ( ) ) ;
0 commit comments