33#![ allow( clippy:: unwrap_used, clippy:: expect_used) ]
44
55use std:: collections:: BTreeMap ;
6+ use std:: fmt:: Write as _;
67use std:: sync:: atomic:: { AtomicUsize , Ordering } ;
78use std:: sync:: Arc ;
89use std:: time:: { Duration , Instant } ;
@@ -161,7 +162,7 @@ fn format_outcome_table(result: &EpochDispatchResult) -> String {
161162 ( "capacity_exhausted" , pack_id. as_str ( ) )
162163 }
163164 } ;
164- s . push_str ( & format ! ( "{:<40} {k:<20} {p}\n " , hex32( key) ) ) ;
165+ let _ = writeln ! ( s , "{:<40} {k:<20} {p}" , hex32( key) ) ;
165166 }
166167 s
167168}
@@ -211,7 +212,7 @@ async fn s1_epoch_fast_slow_dead_outcomes() {
211212 assert_eq ! ( client. fast_before_slow. load( Ordering :: SeqCst ) , 1 ) ;
212213}
213214
214- /// S2 — hang past deadline → TimedOut; epoch still completes with |E|.
215+ /// S2 — hang past deadline → ` TimedOut` ; epoch still completes with |E|.
215216#[ tokio:: test]
216217async fn s2_deadline_timeout_epoch_completes ( ) {
217218 let expected = ExpectedSet {
@@ -258,7 +259,7 @@ async fn s3_second_signer_refused() {
258259 let _g2 = signers. try_acquire ( "agent-v1" , 99 ) . expect ( "after drop" ) ;
259260}
260261
261- /// S3b — run_epoch_dispatch refuses when lease already held.
262+ /// S3b — ` run_epoch_dispatch` refuses when lease already held.
262263#[ tokio:: test]
263264async fn s3b_run_epoch_refuses_second_signer ( ) {
264265 let expected = ExpectedSet {
@@ -278,7 +279,7 @@ async fn s3b_run_epoch_refuses_second_signer() {
278279 assert ! ( matches!( err, EpochLoopError :: SignerAlreadyActive { .. } ) ) ;
279280}
280281
281- /// S4 — abort in-flight JoinSet without leak.
282+ /// S4 — abort in-flight ` JoinSet` without leak.
282283#[ tokio:: test]
283284async fn s4_cancel_aborts_inflight ( ) {
284285 let expected = ExpectedSet {
@@ -298,7 +299,7 @@ async fn s4_cancel_aborts_inflight() {
298299 assert ! ( err. is_cancelled( ) ) ;
299300}
300301
301- /// Capacity gate: free_slots==0 → CapacityExhausted, no run_pack.
302+ /// Capacity gate: ` free_slots==0` → ` CapacityExhausted` , no ` run_pack` .
302303#[ tokio:: test]
303304async fn capacity_exhausted_skips_run ( ) {
304305 let expected = ExpectedSet {
0 commit comments