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::*;