Clean up
This commit is contained in:
parent
5d6e4f7332
commit
fc2e25ce76
4 changed files with 2 additions and 60 deletions
|
@ -47,9 +47,6 @@ impl MailboxView {
|
|||
/// has a satisfactory summary of the current mailbox's state.
|
||||
/// These are the messages that are sent in response to a SELECT command.
|
||||
pub async fn new(mailbox: Arc<Mailbox>) -> Result<(Self, Vec<Body>)> {
|
||||
// TODO THIS IS JUST A TEST REMOVE LATER
|
||||
mailbox.test().await?;
|
||||
|
||||
let state = mailbox.current_uid_index().await;
|
||||
|
||||
let new_view = Self {
|
||||
|
@ -74,8 +71,6 @@ impl MailboxView {
|
|||
/// responses describing the changes.
|
||||
pub async fn sync_update(&mut self) -> Result<Vec<Body>> {
|
||||
self.mailbox.sync().await?;
|
||||
// TODO THIS IS JUST A TEST REMOVE LATER
|
||||
self.mailbox.test().await?;
|
||||
|
||||
self.update().await
|
||||
}
|
||||
|
|
|
@ -72,12 +72,6 @@ impl Manager {
|
|||
|
||||
//-----
|
||||
|
||||
pub struct InnerContext<'a> {
|
||||
pub req: &'a Request,
|
||||
pub state: &'a flow::State,
|
||||
pub login: &'a ArcLoginProvider,
|
||||
}
|
||||
|
||||
pub struct Instance {
|
||||
rx: mpsc::Receiver<Message>,
|
||||
|
||||
|
|
|
@ -296,7 +296,6 @@ async fn k2v_lock_loop_internal(
|
|||
}
|
||||
}
|
||||
}
|
||||
info!("Stopping lock state watch");
|
||||
}
|
||||
.boxed();
|
||||
|
||||
|
|
|
@ -44,6 +44,8 @@ impl Mailbox {
|
|||
.await?;
|
||||
}
|
||||
|
||||
dump(&uid_index);
|
||||
|
||||
let mbox = RwLock::new(MailboxInternal {
|
||||
id,
|
||||
bucket: creds.bucket().to_string(),
|
||||
|
@ -153,13 +155,6 @@ impl Mailbox {
|
|||
};
|
||||
selflock.move_from(&mut fromlock, uuid).await
|
||||
}
|
||||
|
||||
// ----
|
||||
|
||||
/// Test procedure TODO WILL REMOVE THIS
|
||||
pub async fn test(&self) -> Result<()> {
|
||||
self.mbox.write().await.test().await
|
||||
}
|
||||
}
|
||||
|
||||
// ----
|
||||
|
@ -437,47 +432,6 @@ impl MailboxInternal {
|
|||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// ----
|
||||
|
||||
async fn test(&mut self) -> Result<()> {
|
||||
Ok(())
|
||||
|
||||
/*
|
||||
self.uid_index.sync().await?;
|
||||
|
||||
dump(&self.uid_index);
|
||||
|
||||
let mail = br#"From: Garage team <garagehq@deuxfleurs.fr>
|
||||
Subject: Welcome to Aerogramme!!
|
||||
|
||||
This is just a test email, feel free to ignore.
|
||||
"#;
|
||||
let mail = IMF::try_from(&mail[..]).unwrap();
|
||||
self.append(mail, None).await?;
|
||||
|
||||
dump(&self.uid_index);
|
||||
|
||||
if self.uid_index.state().idx_by_uid.len() > 6 {
|
||||
for i in 0..2 {
|
||||
let (_, ident) = self
|
||||
.uid_index
|
||||
.state()
|
||||
.idx_by_uid
|
||||
.iter()
|
||||
.skip(3 + i)
|
||||
.next()
|
||||
.unwrap();
|
||||
|
||||
self.delete(*ident).await?;
|
||||
|
||||
dump(&self.uid_index);
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
fn dump(uid_index: &Bayou<UidIndex>) {
|
||||
|
|
Loading…
Reference in a new issue