mirror of
https://github.com/chatmail/core.git
synced 2026-09-22 13:01:21 +03:00
refactor: use &[..] instead of &Vec<..>
Most of such cases are detected by clippy::ptr_arg, but in these cases clippy did not catch anything.
This commit is contained in:
@@ -253,7 +253,7 @@ pub(crate) async fn load_broadcast_reactions(
|
||||
pub(crate) async fn save_broadcast_reactions(
|
||||
context: &Context,
|
||||
msg_id: MsgId,
|
||||
frequencies: &Vec<ReactionFrequency>,
|
||||
frequencies: &[ReactionFrequency],
|
||||
) -> Result<()> {
|
||||
context
|
||||
.sql
|
||||
|
||||
@@ -99,7 +99,7 @@ impl QrInvite {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn addrs(&self) -> &Vec<String> {
|
||||
pub(crate) fn addrs(&self) -> &[String] {
|
||||
match self {
|
||||
QrInvite::Contact { addrs, .. } => addrs,
|
||||
QrInvite::Group { addrs, .. } => addrs,
|
||||
|
||||
@@ -382,7 +382,7 @@ impl Context {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn sync_message_deletion(&self, msgs: &Vec<String>) -> Result<()> {
|
||||
async fn sync_message_deletion(&self, msgs: &[String]) -> Result<()> {
|
||||
let mut modified_chat_ids = BTreeSet::new();
|
||||
let mut msg_ids = Vec::new();
|
||||
for rfc724_mid in msgs {
|
||||
|
||||
Reference in New Issue
Block a user