|
|
@@ -312,7 +312,7 @@ impl VerifyAuthorityDaemon {
|
|
|
|head: &VerifyAuthorityToken| head.rough_time < expiring_line;
|
|
|
// Note rough_time might not be in increasing order, so we might still
|
|
|
// 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
|
|
|
.queue
|
|
|
.pop_front()
|
|
|
@@ -480,6 +480,7 @@ mod tests {
|
|
|
{
|
|
|
let state = daemon.state.lock();
|
|
|
assert_eq!(1, state.queue.len());
|
|
|
+ #[allow(clippy::get_first)]
|
|
|
let token = state.queue.get(0).unwrap();
|
|
|
assert_eq!(
|
|
|
[Beat(11), Beat(9), Beat(7), Beat(5), Beat(3)],
|
|
|
@@ -503,6 +504,7 @@ mod tests {
|
|
|
assert_eq!(COMMIT_INDEX + 10, token.commit_index);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
#[test]
|
|
|
fn test_verify_authority_async_term_mismatch() {
|
|
|
let daemon = init_daemon();
|