# Fix ensureTotalCapacity calls that should be ensureUnusedCapacity calls · gitcafe/zig

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

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

Visibility: public

Requested revision: 70ef9bc75c42ec00e9d4231a2e1f1dca84144748

Requested commit: 70ef9bc75c42ec00e9d4231a2e1f1dca84144748

Commit: 70ef9bc75c42ec00e9d4231a2e1f1dca84144748

Tree: e172783da32798ca11c3b28c43cbcffb05fbf9d5

Author: Ryan Liptak

Committer: Andrew Kelley

## Message

```
Fix ensureTotalCapacity calls that should be ensureUnusedCapacity calls

If these functions are called more than once, then the array list would no longer be guaranteed to have enough capacity during the appendAssumeCapacity calls. With ensureUnusedCapacity, they will always be guaranteed to have enough capacity regardless of how many times the function is called.

```

## Parents

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

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