diff --git a/src/imap/mod.rs b/src/imap/mod.rs index eec556811..eb7bf5f88 100644 --- a/src/imap/mod.rs +++ b/src/imap/mod.rs @@ -431,16 +431,16 @@ impl Imap { } pub async fn fetch(&self, context: &Context, watch_folder: &str) -> Result<()> { - if !context.sql.is_open() { - // probably shutdown - return Err(Error::InTeardown); - } - self.setup_handle_if_needed(context).await?; + if !context.sql.is_open() { + // probably shutdown + return Err(Error::InTeardown); + } + self.setup_handle_if_needed(context).await?; - while self.fetch_new_messages(context, &watch_folder).await? { - // We fetch until no more new messages are there. - } - Ok(()) + while self.fetch_new_messages(context, &watch_folder).await? { + // We fetch until no more new messages are there. + } + Ok(()) } fn get_config_last_seen_uid>(&self, context: &Context, folder: S) -> (u32, u32) { diff --git a/src/job.rs b/src/job.rs index 7d87eebec..d80a0f365 100644 --- a/src/job.rs +++ b/src/job.rs @@ -401,11 +401,11 @@ pub fn perform_inbox_fetch(context: &Context) { let use_network = context.get_config_bool(Config::InboxWatch); task::block_on( - context - .inbox_thread - .write() - .unwrap() - .fetch(context, use_network), + context + .inbox_thread + .write() + .unwrap() + .fetch(context, use_network), ); } @@ -413,11 +413,11 @@ pub fn perform_mvbox_fetch(context: &Context) { let use_network = context.get_config_bool(Config::MvboxWatch); task::block_on( - context - .mvbox_thread - .write() - .unwrap() - .fetch(context, use_network), + context + .mvbox_thread + .write() + .unwrap() + .fetch(context, use_network), ); } @@ -425,11 +425,11 @@ pub fn perform_sentbox_fetch(context: &Context) { let use_network = context.get_config_bool(Config::SentboxWatch); task::block_on( - context - .sentbox_thread - .write() - .unwrap() - .fetch(context, use_network), + context + .sentbox_thread + .write() + .unwrap() + .fetch(context, use_network), ); }