Skip to content

Commit

Permalink
perf(queue): use latter stable gramma (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
fu050409 authored Oct 18, 2024
1 parent d8f688a commit 8a10a33
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions crates/aionbot-core/src/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,7 @@ impl<T: Eq + Hash + Clone> EventQueue<T> {
}

pub fn pop(&mut self) -> Option<T> {
while let Some(EventEntry {
priority: _,
counter: _,
item,
}) = self.heap.pop()
{
while let Some(EventEntry { item, .. }) = self.heap.pop() {
if let Some(Some(_)) = self.entry_finder.remove(&item) {
self.order_queue.retain(|x| x != &item);
return Some(item);
Expand Down

0 comments on commit 8a10a33

Please sign in to comment.