From 8c4dc0ee931b0aac2acc47d3cdfc639982dc293d Mon Sep 17 00:00:00 2001 From: wtclaude Date: Sat, 1 Aug 2026 01:40:03 -0500 Subject: [PATCH] fix(sidecar): apply rustfmt to the protocol 3.0 cutover code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The release workflow's first gate is `cargo fmt --check`, and the 3.0 cutover merge (2301c57) landed two rustfmt violations in the `world.ruleset` path, so the run failed before it could build or tag: - main.rs: the `upsert_ruleset(..)` call fits on one line - store.rs: the `upsert_ruleset` signature does not No behavior change — formatting only. Co-Authored-By: Claude --- sidecar/src/main.rs | 6 +----- sidecar/src/store.rs | 7 ++++++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sidecar/src/main.rs b/sidecar/src/main.rs index 1a5a659..5cb6816 100644 --- a/sidecar/src/main.rs +++ b/sidecar/src/main.rs @@ -262,11 +262,7 @@ async fn main() -> anyhow::Result<()> { // lets a reader tell a re-send from an actual config change. "world.ruleset" => { if let Err(e) = event_store - .upsert_ruleset( - ev.value.get("rev").and_then(|r| r.as_str()), - &text, - t, - ) + .upsert_ruleset(ev.value.get("rev").and_then(|r| r.as_str()), &text, t) .await { tracing::warn!(error = %e, "failed to upsert ruleset"); diff --git a/sidecar/src/store.rs b/sidecar/src/store.rs index d1e55cc..66117b8 100644 --- a/sidecar/src/store.rs +++ b/sidecar/src/store.rs @@ -299,7 +299,12 @@ impl Store { /// `world.ruleset` frame per connect describing how it is configured, and only the latest one /// matters. `rev` is the shard's FNV-1a of the body, kept so a reader can tell "same ruleset, /// re-sent on reconnect" from "the operator changed something" without diffing the JSON. - pub async fn upsert_ruleset(&self, rev: Option<&str>, json: &str, t: i64) -> anyhow::Result<()> { + pub async fn upsert_ruleset( + &self, + rev: Option<&str>, + json: &str, + t: i64, + ) -> anyhow::Result<()> { sqlx::query( "INSERT INTO ruleset (id, rev, json, updated_t) VALUES (1, ?, ?, ?) ON CONFLICT(id) DO UPDATE SET rev = excluded.rev, json = excluded.json, updated_t = excluded.updated_t",