# std/hash_map: fix ensureUnusedCapacity\(\) over-allocating · gitcafe/zig

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

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

Visibility: public

Requested revision: 03156e589939993bba339162d27d24fd511601c6

Requested commit: 03156e589939993bba339162d27d24fd511601c6

Commit: 03156e589939993bba339162d27d24fd511601c6

Tree: 3752699ba2a0a2bd10938f9eb4b191b11a72820d

Author: Isaac Freund

Committer: Andrew Kelley

## Message

```
std/hash_map: fix ensureUnusedCapacity() over-allocating

Currently this function adds the desired unused capactiy to the current
total capacity instead of the current used capactiy.

```

## Parents

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

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