core: what rustfmt actually wanted
Desktop (Tauri) / Windows installer (cross-compiled) (push) Successful in 2m59s
Desktop (Tauri) / Tauri desktop (Linux) (push) Successful in 5m14s
Desktop (Tauri) / Update manifest (push) Successful in 4s
Android / Kotlin + Rust (APK) (push) Successful in 7m11s

Three from the checker's own diff. Two are the rule I had guessed at: when a
call overflows and its last argument is a closure, rustfmt keeps the earlier
arguments on the line and expands the closure into a block, rather than putting
every argument on its own line.

The third is a stray double blank line before the test module.
This commit is contained in:
2026-08-24 00:49:05 -04:00
parent 668f7faf03
commit 32dafca148
2 changed files with 7 additions and 7 deletions
+4 -1
View File
@@ -396,7 +396,10 @@ mod tests {
assert_eq!(append_item("a note", "milk", false), "a note\n\n- [ ] milk");
// Nothing between consecutive items.
let one = "a note\n\n- [ ] milk";
assert_eq!(append_item(one, "eggs", false), format!("{one}\n- [ ] eggs"));
assert_eq!(
append_item(one, "eggs", false),
format!("{one}\n- [ ] eggs")
);
// A list-only note starts at the first line.
assert_eq!(append_item("", "milk", false), "- [ ] milk");
assert_eq!(append_item("\n\n", "milk", false), "- [ ] milk");
+3 -6
View File
@@ -222,11 +222,9 @@ fn migrate_v8(conn: &Connection) -> rusqlite::Result<()> {
for (note_id, items) in grouped {
let existing: Option<String> = conn
.query_row(
"SELECT body FROM notes WHERE id = ?1",
[&note_id],
|r| r.get(0),
)
.query_row("SELECT body FROM notes WHERE id = ?1", [&note_id], |r| {
r.get(0)
})
.optional()?;
// An item whose note is already gone has nothing to fold into. The foreign key
// should make this impossible; skipping costs nothing, and failing here would
@@ -290,7 +288,6 @@ pub fn migrate(conn: &Connection) -> rusqlite::Result<()> {
Ok(())
}
#[cfg(test)]
mod tests {
use super::*;