fix(blob): address review issues - visibility, unused param

This commit is contained in:
rustmailer
2026-06-23 23:20:24 +08:00
parent 4e12ae5457
commit b0374517e8
+4 -4
View File
@@ -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