style(quic): format-stable clock test assert (message to comment)
ci / rust (push) Has been cancelled
ci / rust (push) Has been cancelled
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) <noreply@anthropic.com>
This commit is contained in:
@@ -1610,8 +1610,10 @@ mod tests {
|
|||||||
let n4 = (n3 as i64 - OFF + 5_000_000) as u64; // 5 ms return → big RTT
|
let n4 = (n3 as i64 - OFF + 5_000_000) as u64; // 5 ms return → big RTT
|
||||||
let (offset, rtt) =
|
let (offset, rtt) =
|
||||||
clock_offset_ns(&[(n1, n2, n3, n4), (t1, t2, t3, t4)]).expect("non-empty");
|
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");
|
// The min-RTT sample recovers the offset exactly; its RTT is 2x200us, and the noisy
|
||||||
assert_eq!(rtt, 400_000, "min-RTT sample's RTT (2x200us), not the noisy 5ms one");
|
// (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());
|
assert!(clock_offset_ns(&[]).is_none());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user