desktop: rustfmt the retention query and one assert
Desktop (Tauri) / Windows installer (cross-compiled) (push) Successful in 1m55s
Desktop (Tauri) / Tauri desktop (Linux) (push) Successful in 3m53s

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SreJkbxB4gx8pPsu8QbLPi
This commit is contained in:
2026-07-26 16:46:45 -04:00
co-authored by Claude Opus 5
parent 7a77a0e1b9
commit d634801bd3
+8 -3
View File
@@ -36,8 +36,9 @@ pub fn sweep_expired_trash(
let cutoff = now - Duration::days(retention_days);
let mut expired: Vec<String> = Vec::new();
{
let mut stmt = conn
.prepare("SELECT id, trashed_at FROM notes WHERE trashed = 1 AND trashed_at IS NOT NULL")?;
let mut stmt = conn.prepare(
"SELECT id, trashed_at FROM notes WHERE trashed = 1 AND trashed_at IS NOT NULL",
)?;
let mut rows = stmt.query([])?;
while let Some(row) = rows.next()? {
let id: String = row.get(0)?;
@@ -210,7 +211,11 @@ mod tests {
trashed_note(&conn, "old", 400);
state::set_link(&conn, "https://notes.example", "token").expect("link");
assert_eq!(sweep_if_unlinked(&conn).expect("sweep"), None);
assert_eq!(note_count(&conn), 1, "the note must survive on a linked device");
assert_eq!(
note_count(&conn),
1,
"the note must survive on a linked device"
);
}
#[test]