mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 07:16:31 +03:00
Remove unused (async)Arc
This identical naming of sync and async arcs is not confusing at all btw.
This commit is contained in:
committed by
holger krekel
parent
42ef43bdf6
commit
fc1a136448
19
src/imap.rs
19
src/imap.rs
@@ -12,7 +12,7 @@ use async_imap::{
|
|||||||
types::{Fetch, Flag, Mailbox, Name, NameAttribute},
|
types::{Fetch, Flag, Mailbox, Name, NameAttribute},
|
||||||
};
|
};
|
||||||
use async_std::prelude::*;
|
use async_std::prelude::*;
|
||||||
use async_std::sync::{Arc, Mutex, RwLock};
|
use async_std::sync::{Mutex, RwLock};
|
||||||
use async_std::task;
|
use async_std::task;
|
||||||
|
|
||||||
use crate::constants::*;
|
use crate::constants::*;
|
||||||
@@ -45,11 +45,10 @@ const SELECT_ALL: &str = "1:*";
|
|||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Imap {
|
pub struct Imap {
|
||||||
config: Arc<RwLock<ImapConfig>>,
|
config: RwLock<ImapConfig>,
|
||||||
|
session: Mutex<Option<Session>>,
|
||||||
session: Arc<Mutex<Option<Session>>>,
|
connected: Mutex<bool>,
|
||||||
connected: Arc<Mutex<bool>>,
|
interrupt: Mutex<Option<stop_token::StopSource>>,
|
||||||
interrupt: Arc<Mutex<Option<stop_token::StopSource>>>,
|
|
||||||
skip_next_idle_wait: AtomicBool,
|
skip_next_idle_wait: AtomicBool,
|
||||||
should_reconnect: AtomicBool,
|
should_reconnect: AtomicBool,
|
||||||
}
|
}
|
||||||
@@ -118,10 +117,10 @@ impl Default for ImapConfig {
|
|||||||
impl Imap {
|
impl Imap {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Imap {
|
Imap {
|
||||||
session: Arc::new(Mutex::new(None)),
|
session: Mutex::new(None),
|
||||||
config: Arc::new(RwLock::new(ImapConfig::default())),
|
config: RwLock::new(ImapConfig::default()),
|
||||||
interrupt: Arc::new(Mutex::new(None)),
|
interrupt: Mutex::new(None),
|
||||||
connected: Arc::new(Mutex::new(false)),
|
connected: Mutex::new(false),
|
||||||
skip_next_idle_wait: AtomicBool::new(false),
|
skip_next_idle_wait: AtomicBool::new(false),
|
||||||
should_reconnect: AtomicBool::new(false),
|
should_reconnect: AtomicBool::new(false),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user