refactor(proto): Remove Clock::None and default to Clock::Both
Simplify clock parameter negotiation by rejecting the ambiguous 'None' value.
This commit is contained in:
1 parent
cf74887bdf
commit
34dd2ee5d2
2 files changed
+27
-4
No files matched your search
@@ -139,7 +139,7 @@ mod tests {
|
||||
assert_eq!(
|
||||
echo_header_len(
|
||||
false,
|
||||
¶ms(ReceivedStats::None, StampAt::None, Clock::None)
|
||||
¶ms(ReceivedStats::None, StampAt::None, Clock::Both)
|
||||
),
|
||||
16
|
||||
);
|
||||
@@ -180,6 +180,16 @@ mod tests {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn no_timestamp_layout_ignores_clock() {
|
||||
for clock in [Clock::Wall, Clock::Monotonic, Clock::Both] {
|
||||
assert_eq!(
|
||||
echo_header_len(false, ¶ms(ReceivedStats::None, StampAt::None, clock)),
|
||||
16
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn negotiated_length_never_smaller_than_header() {
|
||||
let mut p = params(ReceivedStats::Both, StampAt::Both, Clock::Both);
|
||||
|
||||
Reference in new issue
Block a user