fmt: apply rustfmt across the P2 arc
ci / gates (push) Successful in 7s
ci / frontend (push) Successful in 37s
ci / rust (push) Successful in 2m50s
ci / e2e (push) Has been skipped
ci / publish (push) Successful in 2m48s

CI's rustfmt check flagged the multi-line sqlx::query() calls I
introduced in P2 (loop_id_for_run, zeroclaw_gateway_url, etc.).
No behavior change — pure formatting.
This commit is contained in:
Omar Sobh
2026-07-09 16:43:05 -07:00
parent 03f1830d1f
commit 44d6e95022
6 changed files with 39 additions and 33 deletions
+9 -7
View File
@@ -252,13 +252,15 @@ pub async fn set_zeroclaw_container(
/// daemon over the workspace-wide one.
pub async fn zeroclaw_gateway_url(pool: &PgPool, loop_id: Uuid) -> Result<Option<String>, DbError> {
use sqlx::Row;
let row = sqlx::query(
"SELECT zeroclaw_gateway_url FROM loops WHERE id = $1",
)
.bind(loop_id)
.fetch_optional(pool)
.await?;
Ok(row.and_then(|r| r.try_get::<Option<String>, _>("zeroclaw_gateway_url").ok().flatten()))
let row = sqlx::query("SELECT zeroclaw_gateway_url FROM loops WHERE id = $1")
.bind(loop_id)
.fetch_optional(pool)
.await?;
Ok(row.and_then(|r| {
r.try_get::<Option<String>, _>("zeroclaw_gateway_url")
.ok()
.flatten()
}))
}
// --- Staffing ---------------------------------------------------------------
+5 -6
View File
@@ -186,12 +186,11 @@ pub async fn research_topic_id(pool: &PgPool, id: Uuid) -> Result<Option<Uuid>,
/// None.
pub async fn loop_id_for_run(pool: &PgPool, id: Uuid) -> Result<Option<Uuid>, DbError> {
use sqlx::Row;
let row: Option<sqlx::postgres::PgRow> = sqlx::query(
"SELECT loop_id FROM topology_runs WHERE id = $1",
)
.bind(id)
.fetch_optional(pool)
.await?;
let row: Option<sqlx::postgres::PgRow> =
sqlx::query("SELECT loop_id FROM topology_runs WHERE id = $1")
.bind(id)
.fetch_optional(pool)
.await?;
Ok(row.and_then(|r| r.try_get::<Option<Uuid>, _>("loop_id").ok().flatten()))
}