cleanup
This commit is contained in:
parent
509e7e4bed
commit
de71f4b4ed
2 changed files with 6 additions and 6 deletions
|
@ -97,7 +97,7 @@ impl MailboxView {
|
||||||
|
|
||||||
// - notify client of expunged mails
|
// - notify client of expunged mails
|
||||||
let mut n_expunge = 0;
|
let mut n_expunge = 0;
|
||||||
for (i, (uid, uuid)) in self.known_state.idx_by_uid.iter().enumerate() {
|
for (i, (_uid, uuid)) in self.known_state.idx_by_uid.iter().enumerate() {
|
||||||
if !new_view.known_state.table.contains_key(uuid) {
|
if !new_view.known_state.table.contains_key(uuid) {
|
||||||
data.push(Body::Data(Data::Expunge(
|
data.push(Body::Data(Data::Expunge(
|
||||||
NonZeroU32::try_from((i + 1 - n_expunge) as u32).unwrap(),
|
NonZeroU32::try_from((i + 1 - n_expunge) as u32).unwrap(),
|
||||||
|
@ -112,7 +112,7 @@ impl MailboxView {
|
||||||
}
|
}
|
||||||
|
|
||||||
// - if flags changed for existing mails, tell client
|
// - if flags changed for existing mails, tell client
|
||||||
for (i, (uid, uuid)) in new_view.known_state.idx_by_uid.iter().enumerate() {
|
for (i, (_uid, uuid)) in new_view.known_state.idx_by_uid.iter().enumerate() {
|
||||||
let old_mail = self.known_state.table.get(uuid);
|
let old_mail = self.known_state.table.get(uuid);
|
||||||
let new_mail = new_view.known_state.table.get(uuid);
|
let new_mail = new_view.known_state.table.get(uuid);
|
||||||
if old_mail.is_some() && old_mail != new_mail {
|
if old_mail.is_some() && old_mail != new_mail {
|
||||||
|
@ -210,10 +210,10 @@ impl MailboxView {
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut ret = vec![];
|
let mut ret = vec![];
|
||||||
for (i, uid, uuid, meta, body) in mails {
|
for (i, uid, uuid, meta, _body) in mails {
|
||||||
let mut attributes = vec![MessageAttribute::Uid(uid)];
|
let mut attributes = vec![MessageAttribute::Uid(uid)];
|
||||||
|
|
||||||
let (uid2, flags) = self
|
let (_uid2, flags) = self
|
||||||
.known_state
|
.known_state
|
||||||
.table
|
.table
|
||||||
.get(&uuid)
|
.get(&uuid)
|
||||||
|
|
|
@ -2,14 +2,14 @@ use anyhow::{anyhow, bail, Result};
|
||||||
use k2v_client::K2vClient;
|
use k2v_client::K2vClient;
|
||||||
use k2v_client::{BatchReadOp, Filter, K2vValue};
|
use k2v_client::{BatchReadOp, Filter, K2vValue};
|
||||||
use rusoto_s3::{
|
use rusoto_s3::{
|
||||||
DeleteObjectRequest, GetObjectRequest, ListObjectsV2Request, PutObjectRequest, S3Client, S3,
|
DeleteObjectRequest, GetObjectRequest, PutObjectRequest, S3Client, S3,
|
||||||
};
|
};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use tokio::io::AsyncReadExt;
|
use tokio::io::AsyncReadExt;
|
||||||
use tokio::sync::RwLock;
|
use tokio::sync::RwLock;
|
||||||
|
|
||||||
use crate::bayou::Bayou;
|
use crate::bayou::Bayou;
|
||||||
use crate::cryptoblob::{self, gen_key, open_deserialize, seal_serialize, Key};
|
use crate::cryptoblob::{self, gen_key, open_deserialize, Key};
|
||||||
use crate::login::Credentials;
|
use crate::login::Credentials;
|
||||||
use crate::mail::uidindex::*;
|
use crate::mail::uidindex::*;
|
||||||
use crate::mail::unique_ident::*;
|
use crate::mail::unique_ident::*;
|
||||||
|
|
Loading…
Reference in a new issue