From 32dafca148edcbb57245c89bbff09ee5059e0635 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Mon, 24 Aug 2026 00:49:05 -0400 Subject: [PATCH] core: what rustfmt actually wanted 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. --- core/src/local/derive.rs | 5 ++++- core/src/local/schema.rs | 9 +++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/src/local/derive.rs b/core/src/local/derive.rs index 835e9a4..fbd3247 100644 --- a/core/src/local/derive.rs +++ b/core/src/local/derive.rs @@ -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"); diff --git a/core/src/local/schema.rs b/core/src/local/schema.rs index b65ea08..943e0d2 100644 --- a/core/src/local/schema.rs +++ b/core/src/local/schema.rs @@ -222,11 +222,9 @@ fn migrate_v8(conn: &Connection) -> rusqlite::Result<()> { for (note_id, items) in grouped { let existing: Option = conn - .query_row( - "SELECT body FROM notes WHERE id = ?1", - [¬e_id], - |r| r.get(0), - ) + .query_row("SELECT body FROM notes WHERE id = ?1", [¬e_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::*;