# std: align PriorityQueue and ArrayList API-wise · gitcafe/zig

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

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

Visibility: public

Requested revision: 9f4f43cf7fdd2b2a50e475a1e7d740c9bcc2227e

Requested commit: 9f4f43cf7fdd2b2a50e475a1e7d740c9bcc2227e

Commit: 9f4f43cf7fdd2b2a50e475a1e7d740c9bcc2227e

Tree: 0f34d876e3552abbc898bd813cc895f0026d9e4f

Author: Alex Kladov

Committer: Andrew Kelley

## Message

```
std: align PriorityQueue and ArrayList API-wise

ArrayList uses `items` slice  to store len initialized items, while
PriorityQueue stores `capacity` potentially uninitialized items.

This is a surprising difference in the API that leads to bugs!

https://github.com/tigerbeetle/tigerbeetle/pull/1948

```

## Parents

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

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