v0.0.5
RustBox CI / rustbox (push) Canceled after 0s

This commit is contained in:
Mateusz Gruszczyński committed 2026-10-30 12:06:44 +01:00
1 parent 96a32ea8fb
commit a643e7e3ab
106 files changed
+2223 -4669

No files matched your search

-9
View File
@@ -1,9 +1,3 @@
//! Reject header batches whose IMAP reads overlap a completed cache removal.
//!
//! The generation is per user database, not per UID: a later sync may discover
//! new destination UIDs or reuse UIDs after UIDVALIDITY changes. No tombstones
//! or locks held over network calls are needed.
use rusqlite::{Connection, OptionalExtension, Transaction, TransactionBehavior};
#[derive(Clone, Copy, PartialEq, Eq)]
@@ -12,7 +6,6 @@ pub(crate) struct HeaderSync {
}
impl HeaderSync {
/// Capture before reading IMAP state, and retain for the whole sync pass.
pub(crate) fn capture(conn: &Connection) -> Result<Self, String> {
let generation = conn
.query_row(
@@ -28,7 +21,6 @@ impl HeaderSync {
Ok(Self { generation })
}
/// Serialize the check and all header/index/status writes with removals.
pub(crate) fn begin_write(self, conn: &Connection) -> Result<Transaction<'_>, String> {
let transaction = Transaction::new_unchecked(conn, TransactionBehavior::Immediate)
.map_err(|e| e.to_string())?;
@@ -39,7 +31,6 @@ impl HeaderSync {
}
}
/// Must run in the same write transaction as the removal or UIDVALIDITY reset.
pub(crate) fn invalidate(conn: &Transaction<'_>) -> Result<(), String> {
conn.execute(
"INSERT INTO user_meta (key, value) VALUES ('header_sync_generation', '1')