Skip to content

Commit

Permalink
refactor: flip !any() to all(!)
Browse files Browse the repository at this point in the history
  • Loading branch information
dav1do committed Jun 27, 2024
1 parent 8a17c76 commit c12f526
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions service/src/event/ordering_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,10 @@ impl StreamEvents {
/// Returns `false` if we have more work to do and should be retained for future processing
fn processing_completed(&mut self) -> bool {
// if we're done, we don't need to bother cleaning up since we get dropped
if !self
if self
.cid_map
.iter()
.any(|(_, ev)| matches!(ev, StreamEvent::Undelivered(_)))
.all(|(_, ev)| !matches!(ev, StreamEvent::Undelivered(_)))
{
true
} else {
Expand Down

0 comments on commit c12f526

Please sign in to comment.