# PriorityQueue: use compareFn in update\(\) · gitcafe/zig

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

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

Visibility: public

Requested revision: d925d19cfcabd96fdc4459e11ecb85a4f42ec655

Requested commit: d925d19cfcabd96fdc4459e11ecb85a4f42ec655

Commit: d925d19cfcabd96fdc4459e11ecb85a4f42ec655

Tree: 40a6e32e492f72d72b21f38cba694d3e253e0956

Author: VÖRÖSKŐI András

Committer: Veikka Tuominen

## Message

```
PriorityQueue: use compareFn in update()

update() calls mem.indexOfScalar() which uses `==` for comparing items,
which fails when the operator is not supported.
As PirorityQueue needs a comparing function anyway we can use `.eq` results
to identify matching objects.

closes #9918

```

## Parents

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

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