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:
link2xt
2026-09-09 05:27:39 +00:00
committed by l
parent 49c30ecc75
commit b0e5b08531
3 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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,

View File

@@ -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 {