# Fix bug in PriorityQueue::removeIndex\(\) · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/497f8a60986eac6c5abd3230b34b975bd1701c53)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 497f8a60986eac6c5abd3230b34b975bd1701c53

Requested commit: 497f8a60986eac6c5abd3230b34b975bd1701c53

Commit: 497f8a60986eac6c5abd3230b34b975bd1701c53

Tree: ce685d1a268815c37b9e3f94d958e26b37c687be

Author: Eric Shrewsberry

Committer: Andrew Kelley

## Message

```
Fix bug in PriorityQueue::removeIndex()

Fix to call siftDown on the removed index instead of always on index 0.
Updated test to a test that fails before and passes now.

PriorityDequeue does not have this issue.

```

## Parents

- [59fa548be8944962d5882e2ac38f6013ac00e84a](https://git.cafe/gitcafe/zig/commit/59fa548be8944962d5882e2ac38f6013ac00e84a?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/497f8a60986eac6c5abd3230b34b975bd1701c53?format=markdown)
