diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-05-15 18:23:23 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-05-15 18:23:23 +0200 |
commit | 9d6aef34add7a1bf32e754951a3d500721a2e626 (patch) | |
tree | ce7fffb46b9071b73a35620980cd25c060a7c908 /src/mail/uidindex.rs | |
parent | 024d8df847ce720f0ec76b288c7a0142672d21f2 (diff) | |
download | aerogramme-9d6aef34add7a1bf32e754951a3d500721a2e626.tar.gz aerogramme-9d6aef34add7a1bf32e754951a3d500721a2e626.zip |
clippy lint fix
Diffstat (limited to 'src/mail/uidindex.rs')
-rw-r--r-- | src/mail/uidindex.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mail/uidindex.rs b/src/mail/uidindex.rs index 43d6507..956b194 100644 --- a/src/mail/uidindex.rs +++ b/src/mail/uidindex.rs @@ -73,9 +73,9 @@ impl UidIndex { // INTERNAL functions to keep state consistent - fn reg_email(&mut self, ident: UniqueIdent, uid: ImapUid, flags: &Vec<Flag>) { + fn reg_email(&mut self, ident: UniqueIdent, uid: ImapUid, flags: &[Flag]) { // Insert the email in our table - self.table.insert(ident, (uid, flags.clone())); + self.table.insert(ident, (uid, flags.to_owned())); // Update the indexes/caches self.idx_by_uid.insert(uid, ident); @@ -205,7 +205,7 @@ impl FlagIndex { fn new() -> Self { Self(HashMap::new()) } - fn insert(&mut self, uid: ImapUid, flags: &Vec<Flag>) { + fn insert(&mut self, uid: ImapUid, flags: &[Flag]) { flags.iter().for_each(|flag| { self.0 .entry(flag.clone()) @@ -213,7 +213,7 @@ impl FlagIndex { .insert(uid); }); } - fn remove(&mut self, uid: ImapUid, flags: &Vec<Flag>) -> () { + fn remove(&mut self, uid: ImapUid, flags: &[Flag]) { for flag in flags.iter() { if let Some(set) = self.0.get_mut(flag) { set.remove(&uid); |