mirror of
https://github.com/rustmailer/bichon.git
synced 2026-08-03 07:48:34 +02:00
fix(blob): address review issues - visibility, unused param
This commit is contained in:
@@ -15,7 +15,7 @@ pub struct AccountHandle {
|
|||||||
id: String,
|
id: String,
|
||||||
dir: PathBuf,
|
dir: PathBuf,
|
||||||
inner: RwLock<AccountInner>,
|
inner: RwLock<AccountInner>,
|
||||||
pub write_mutex: Mutex<()>,
|
pub(crate) write_mutex: Mutex<()>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AccountHandle {
|
impl AccountHandle {
|
||||||
@@ -33,7 +33,7 @@ impl AccountHandle {
|
|||||||
if !dir.exists() {
|
if !dir.exists() {
|
||||||
return Err(Error::AccountNotFound(account_id.to_string()));
|
return Err(Error::AccountNotFound(account_id.to_string()));
|
||||||
}
|
}
|
||||||
let inner = AccountInner::open(&dir, account_id)?;
|
let inner = AccountInner::open(&dir)?;
|
||||||
Ok(Arc::new(Self {
|
Ok(Arc::new(Self {
|
||||||
id: account_id.to_string(),
|
id: account_id.to_string(),
|
||||||
dir,
|
dir,
|
||||||
@@ -72,13 +72,13 @@ impl AccountHandle {
|
|||||||
|
|
||||||
pub struct AccountInner {
|
pub struct AccountInner {
|
||||||
dir: PathBuf,
|
dir: PathBuf,
|
||||||
pub meta: AccountMeta,
|
meta: AccountMeta,
|
||||||
active_writer: SegmentWriter,
|
active_writer: SegmentWriter,
|
||||||
readers: HashMap<u32, SegmentReader>,
|
readers: HashMap<u32, SegmentReader>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AccountInner {
|
impl AccountInner {
|
||||||
fn open(dir: &Path, _account_id: &str) -> Result<Self> {
|
fn open(dir: &Path) -> Result<Self> {
|
||||||
let meta = AccountMeta::load(dir)?;
|
let meta = AccountMeta::load(dir)?;
|
||||||
|
|
||||||
let seg_path = dir
|
let seg_path = dir
|
||||||
|
|||||||
Reference in New Issue
Block a user