From 1c94f46be8474a510daed28f6d850004b0a02837 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Fri, 12 Jun 2026 12:01:56 +0000 Subject: [PATCH] style(quic): format-stable clock test assert (message to comment) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The clock_offset test's assert_eq! carried an inline message that newer rustfmt wants to wrap while the repo's committed style keeps such asserts on one line. Move the message to a comment and use bare assert_eq! so it formats identically under any rustfmt version — no new fmt-check ambiguity from this addition. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/punktfunk-core/src/quic.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/punktfunk-core/src/quic.rs b/crates/punktfunk-core/src/quic.rs index 12c4dd3..a4d0757 100644 --- a/crates/punktfunk-core/src/quic.rs +++ b/crates/punktfunk-core/src/quic.rs @@ -1610,8 +1610,10 @@ mod tests { let n4 = (n3 as i64 - OFF + 5_000_000) as u64; // 5 ms return → big RTT let (offset, rtt) = clock_offset_ns(&[(n1, n2, n3, n4), (t1, t2, t3, t4)]).expect("non-empty"); - assert_eq!(offset, OFF, "min-RTT sample recovers the offset exactly"); - assert_eq!(rtt, 400_000, "min-RTT sample's RTT (2x200us), not the noisy 5ms one"); + // The min-RTT sample recovers the offset exactly; its RTT is 2x200us, and the noisy + // (asymmetric, 5 ms return) sample is ignored by the min-RTT selection. + assert_eq!(offset, OFF); + assert_eq!(rtt, 400_000); assert!(clock_offset_ns(&[]).is_none()); }