diff --git a/crates/claude-connector/src/backend/tests.rs b/crates/claude-connector/src/backend/tests.rs index a48aa9c..2e3b993 100644 --- a/crates/claude-connector/src/backend/tests.rs +++ b/crates/claude-connector/src/backend/tests.rs @@ -2456,7 +2456,12 @@ fn a_result_that_made_no_api_call_bills_nothing() { // CLI reported rows: the reservation stands. ("", 2300, empty, false), (r#""api_error_status":500,"#, 0, empty, false), - (r#""api_error_status":null,"#, 0, r#","model_usage_since_last_result":"?""#, false), + ( + r#""api_error_status":null,"#, + 0, + r#","model_usage_since_last_result":"?""#, + false, + ), ]; for (status, api_ms, extra, free) in cases { let line = not_logged_in_line(status, api_ms, extra); diff --git a/crates/claude-connector/src/quota.rs b/crates/claude-connector/src/quota.rs index a8477fd..76f0ce4 100644 --- a/crates/claude-connector/src/quota.rs +++ b/crates/claude-connector/src/quota.rs @@ -110,7 +110,10 @@ mod tests { let cell = QuotaCell::new(); cell.observe_at(100, [quota("five_hour", 80, 0)]); cell.observe_at(900, Vec::new()); - assert_eq!(cell.snapshot_at(950).windows, vec![quota("five_hour", 80, 100)]); + assert_eq!( + cell.snapshot_at(950).windows, + vec![quota("five_hour", 80, 100)] + ); } #[test] @@ -123,7 +126,10 @@ mod tests { assert_eq!(expired.len(), 1); assert_eq!(expired[0].status, "expired"); assert_eq!(expired[0].utilization_permille, None); - assert_eq!(expired[0].observed_at_unix_ms, 100, "its age stays readable"); + assert_eq!( + expired[0].observed_at_unix_ms, 100, + "its age stays readable" + ); assert_eq!(expired[0].resets_at_unix_ms, RESET); } diff --git a/crates/claude-connector/src/stream.rs b/crates/claude-connector/src/stream.rs index 1c56821..f712892 100644 --- a/crates/claude-connector/src/stream.rs +++ b/crates/claude-connector/src/stream.rs @@ -357,11 +357,7 @@ fn fail(kind: FailureKind, message: &'static str) -> Step { /// 403 or 429, or a call never made); elsewhere the CLI also zeroes usage on /// crashes after real work. A call never made (`absent_is_zero`) may also /// omit the field. `None` is billed the reservation by the kit. -fn read_usage( - reported: Option, - empty_is_zero: bool, - absent_is_zero: bool, -) -> Option { +fn read_usage(reported: Option, empty_is_zero: bool, absent_is_zero: bool) -> Option { let Some(reported) = reported else { return absent_is_zero.then(|| sum_usage(std::iter::empty())); }; diff --git a/crates/model-connector/src/readout.rs b/crates/model-connector/src/readout.rs index e4e34df..36d4cb9 100644 --- a/crates/model-connector/src/readout.rs +++ b/crates/model-connector/src/readout.rs @@ -107,15 +107,7 @@ mod tests { panic!("a readout is a map, not a positional array"); }; let names: Vec<&str> = fields.iter().filter_map(|(k, _)| k.as_str()).collect(); - assert_eq!( - names, - [ - "schema_id", - "at_unix_ms", - "callers", - "plan_quota" - ] - ); + assert_eq!(names, ["schema_id", "at_unix_ms", "callers", "plan_quota"]); assert_eq!(wire_decode::(&bytes).unwrap(), readout()); }