From cbb952fccf99a73e95d6d82f9a895726eadb1e75 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 28 Oct 2026 16:37:27 +0100 Subject: [PATCH] connector-spend: rustfmt the new tests Co-Authored-By: Claude Opus 5.5 --- crates/model-connector/src/service.rs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/crates/model-connector/src/service.rs b/crates/model-connector/src/service.rs index 4206b12..6bd7e22 100644 --- a/crates/model-connector/src/service.rs +++ b/crates/model-connector/src/service.rs @@ -735,8 +735,12 @@ impl TransportService { // A request belongs to the window it is admitted in. The ceiling is // checked after the replay lookup, so a recorded answer is replayed // whatever the caller has left. - let admitted_at_unix_ms = - admission_clock(&self.window_spend, &identity.caller_runtime_id, now_unix_ms, spend_window_ms); + let admitted_at_unix_ms = admission_clock( + &self.window_spend, + &identity.caller_runtime_id, + now_unix_ms, + spend_window_ms, + ); let window = admitted_at_unix_ms / spend_window_ms; prune_windows( &mut self.window_spend, @@ -3375,7 +3379,10 @@ mod tests { &usage(a, b, prompt - a - b, output), request.cache_retention, ); - assert!(cost <= reserved, "{price:?} {a} {b} {output}: {cost} > {reserved}"); + assert!( + cost <= reserved, + "{price:?} {a} {b} {output}: {cost} > {reserved}" + ); } } @@ -3398,6 +3405,9 @@ mod tests { } assert_eq!(service.window_spend(CALLER, 0), 0); assert_eq!(service.window_spend(CALLER, 1), FIXTURE_USAGE_COST); - assert_eq!(service.window_spend("ghostlight-yggdrasil", 0), reservation()); + assert_eq!( + service.window_spend("ghostlight-yggdrasil", 0), + reservation() + ); } }