From ed8d24bb1dac8f315f134edb7f963e74afdf4e47 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 17 Jul 2026 11:41:37 -0500 Subject: [PATCH] style(sidecar): rustfmt-wrap wide signatures/calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The release workflow's `cargo fmt --check` gate failed on the Protocol 2.0 additions: upsert_guild/upsert_house signatures and their call sites in main.rs exceeded rustfmt's default width. Reformatted with `cargo fmt` — no behavioral change. `cargo fmt --check`, `cargo check`, and `cargo test` all clean. Co-Authored-By: Claude Opus 4.8 --- sidecar/src/main.rs | 14 ++++++++++++-- sidecar/src/store.rs | 16 ++++++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/sidecar/src/main.rs b/sidecar/src/main.rs index c43b874..c6ce727 100644 --- a/sidecar/src/main.rs +++ b/sidecar/src/main.rs @@ -142,7 +142,12 @@ async fn main() -> anyhow::Result<()> { "guild.update" => { if let Some(id) = ev.value.get("id").and_then(|v| v.as_i64()) { if let Err(e) = event_store - .upsert_guild(id, ev.value.get("name").and_then(|n| n.as_str()), &text, t) + .upsert_guild( + id, + ev.value.get("name").and_then(|n| n.as_str()), + &text, + t, + ) .await { tracing::warn!(error = %e, "failed to upsert guild board"); @@ -170,7 +175,12 @@ async fn main() -> anyhow::Result<()> { "house.update" => { if let Some(serial) = ev.value.get("serial").and_then(|s| s.as_str()) { if let Err(e) = event_store - .upsert_house(serial, ev.value.get("name").and_then(|n| n.as_str()), &text, t) + .upsert_house( + serial, + ev.value.get("name").and_then(|n| n.as_str()), + &text, + t, + ) .await { tracing::warn!(error = %e, "failed to upsert house registry"); diff --git a/sidecar/src/store.rs b/sidecar/src/store.rs index d3ec36d..58f42cb 100644 --- a/sidecar/src/store.rs +++ b/sidecar/src/store.rs @@ -192,7 +192,13 @@ impl Store { /// Upserts one guild's latest state, keyed by guild id. Fed from `guild.update`; one row per /// guild, always the most recent snapshot. This is the board the website reads on load. - pub async fn upsert_guild(&self, id: i64, name: Option<&str>, json: &str, t: i64) -> anyhow::Result<()> { + pub async fn upsert_guild( + &self, + id: i64, + name: Option<&str>, + json: &str, + t: i64, + ) -> anyhow::Result<()> { sqlx::query( "INSERT INTO guilds (id, name, json, updated_t) VALUES (?, ?, ?, ?) ON CONFLICT(id) DO UPDATE SET name = excluded.name, json = excluded.json, updated_t = excluded.updated_t", @@ -250,7 +256,13 @@ impl Store { // ---- house registry (Protocol 2.0) ---- /// Upserts one house's latest state, keyed by serial. Fed from `house.update`. - pub async fn upsert_house(&self, serial: &str, name: Option<&str>, json: &str, t: i64) -> anyhow::Result<()> { + pub async fn upsert_house( + &self, + serial: &str, + name: Option<&str>, + json: &str, + t: i64, + ) -> anyhow::Result<()> { sqlx::query( "INSERT INTO houses (serial, name, json, updated_t) VALUES (?, ?, ?, ?) ON CONFLICT(serial) DO UPDATE SET name = excluded.name, json = excluded.json, updated_t = excluded.updated_t", -- 2.49.1