desktop: rustfmt the summary() count closure
Desktop (Tauri) / Tauri desktop (Linux) (push) Successful in 3m42s
Desktop (Tauri) / Tauri desktop (Linux) (push) Successful in 3m42s
cargo fmt --check (run 2856) wanted the long closure body wrapped in a block. Formatting only. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FRgehjoz7Yv8LkUfADxACm
This commit is contained in:
@@ -31,7 +31,10 @@ pub fn summary(db: &Db) -> String {
|
|||||||
Ok(c) => c,
|
Ok(c) => c,
|
||||||
Err(_) => return "counts unavailable (lock poisoned)".to_string(),
|
Err(_) => return "counts unavailable (lock poisoned)".to_string(),
|
||||||
};
|
};
|
||||||
let count = |sql: &str| conn.query_row(sql, [], |r| r.get::<_, i64>(0)).unwrap_or(-1);
|
let count = |sql: &str| {
|
||||||
|
conn.query_row(sql, [], |r| r.get::<_, i64>(0))
|
||||||
|
.unwrap_or(-1)
|
||||||
|
};
|
||||||
format!(
|
format!(
|
||||||
"{} notes, {} labels",
|
"{} notes, {} labels",
|
||||||
count("SELECT COUNT(*) FROM notes"),
|
count("SELECT COUNT(*) FROM notes"),
|
||||||
|
|||||||
Reference in New Issue
Block a user