nix fmt + rustfmt sweep

This commit is contained in:
müde 2026-05-17 01:40:28 +02:00
parent 0cf120e9e9
commit 411cf86632
16 changed files with 171 additions and 133 deletions

View file

@ -103,7 +103,13 @@ impl Approvals {
conn.execute(
"INSERT INTO approvals (agent, kind, commit_ref, requested_at, status, description)
VALUES (?1, ?2, ?3, ?4, 'pending', ?5)",
params![agent, kind_to_str(kind), commit_ref, now_unix(), description],
params![
agent,
kind_to_str(kind),
commit_ref,
now_unix(),
description
],
)?;
Ok(conn.last_insert_rowid())
}
@ -164,8 +170,16 @@ impl Approvals {
/// approval so the caller can run the action and pass the agent name.
pub fn mark_approved(&self, id: i64) -> Result<Approval> {
let conn = self.conn.lock().unwrap();
let current: Option<(String, String, String, i64, String, Option<String>, Option<String>)> =
conn.query_row(
let current: Option<(
String,
String,
String,
i64,
String,
Option<String>,
Option<String>,
)> = conn
.query_row(
"SELECT agent, kind, commit_ref, requested_at, status, fetched_sha, description
FROM approvals WHERE id = ?1",
params![id],