|
@@ -312,7 +312,7 @@ impl VerifyAuthorityDaemon {
|
|
|
|head: &VerifyAuthorityToken| head.rough_time < expiring_line;
|
|
|head: &VerifyAuthorityToken| head.rough_time < expiring_line;
|
|
|
// Note rough_time might not be in increasing order, so we might still
|
|
// Note rough_time might not be in increasing order, so we might still
|
|
|
// have requests that are expired in the queue after the sweep.
|
|
// have requests that are expired in the queue after the sweep.
|
|
|
- while state.queue.front().map_or(false, expired) {
|
|
|
|
|
|
|
+ while state.queue.front().is_some_and(expired) {
|
|
|
state
|
|
state
|
|
|
.queue
|
|
.queue
|
|
|
.pop_front()
|
|
.pop_front()
|
|
@@ -504,6 +504,7 @@ mod tests {
|
|
|
assert_eq!(COMMIT_INDEX + 10, token.commit_index);
|
|
assert_eq!(COMMIT_INDEX + 10, token.commit_index);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
#[test]
|
|
#[test]
|
|
|
fn test_verify_authority_async_term_mismatch() {
|
|
fn test_verify_authority_async_term_mismatch() {
|
|
|
let daemon = init_daemon();
|
|
let daemon = init_daemon();
|