From 7d9a6509f38cc3fbf7b8ae39f9017d7fc791556e Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sat, 25 Jul 2026 23:38:49 -0400 Subject: [PATCH] desktop: rustfmt the M10.7a state tests Four macro-argument splits, applied verbatim from run 2895's cargo fmt --check diff. No logic change. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01SreJkbxB4gx8pPsu8QbLPi --- desktop/src-tauri/src/sync/state.rs | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/desktop/src-tauri/src/sync/state.rs b/desktop/src-tauri/src/sync/state.rs index c8ddf06..ba90c4f 100644 --- a/desktop/src-tauri/src/sync/state.rs +++ b/desktop/src-tauri/src/sync/state.rs @@ -148,7 +148,10 @@ mod tests { set_link(&conn, "https://notes.example.com", "tok-1").expect("link"); let state = read(&conn).expect("read"); assert!(state.is_linked()); - assert_eq!(state.server_url.as_deref(), Some("https://notes.example.com")); + assert_eq!( + state.server_url.as_deref(), + Some("https://notes.example.com") + ); assert_eq!(state.device_token.as_deref(), Some("tok-1")); } @@ -160,7 +163,10 @@ mod tests { // e.g. the token was revoked and the user re-authenticated. set_link(&conn, "https://a.example.com", "tok-2").expect("relink"); let state = read(&conn).expect("read"); - assert_eq!(state.last_cursor, 4242, "a re-auth shouldn't force a full re-sync"); + assert_eq!( + state.last_cursor, 4242, + "a re-auth shouldn't force a full re-sync" + ); assert_eq!(state.device_token.as_deref(), Some("tok-2")); } @@ -217,8 +223,11 @@ mod tests { #[test] fn unparseable_cursor_falls_back_to_a_full_sync() { let conn = db(); - conn.execute("UPDATE sync_state SET last_cursor = 'garbage' WHERE id = 1", []) - .expect("bad cursor"); + conn.execute( + "UPDATE sync_state SET last_cursor = 'garbage' WHERE id = 1", + [], + ) + .expect("bad cursor"); assert_eq!(read(&conn).expect("read").last_cursor, 0); } @@ -227,7 +236,10 @@ mod tests { let conn = db(); set_link(&conn, "https://a.example.com", "super-secret").expect("link"); let json = serde_json::to_string(&status(&conn).expect("status")).expect("serialize"); - assert!(!json.contains("super-secret"), "token leaked to the webview: {json}"); + assert!( + !json.contains("super-secret"), + "token leaked to the webview: {json}" + ); assert!(json.contains("\"linked\":true"), "got {json}"); } }