sentientwaffle f04e65bc09 std.hash_map: fetchRemove increment available
To avoid leaking slots, `fetchRemove` must increment `available` (when the "fetch" succeeds).

Without the `available += 1`, the added test `"std.hash_map repeat fetchRemove"` fails with

    run test std-x86-linux-none-Debug: error: thread 432734 panic: integer overflow
    .../zig/lib/std/hash_map.zig:1365:28: 0x6471d5 in getOrPutAssumeCapacityAdapted__anon_47495 (test)
            self.available -= 1;
                           ^
    .../zig/lib/std/hash_map.zig:1308:62: 0x616950 in getOrPutAssumeCapacityContext (test)
            const result = self.getOrPutAssumeCapacityAdapted(key, ctx);
                                                             ^

Alternatively, `fetchRemove` could call `removeByIndex`, though that would entail calling `header()` twice instead of once.
2023-06-10 02:24:35 +03:00
..
2023-04-30 18:16:04 -07:00
2023-05-29 22:08:43 +03:00
2023-06-07 19:27:17 -07:00
2023-04-30 18:16:04 -07:00
2023-05-23 17:55:59 -07:00
2022-12-13 13:14:20 +02:00
2023-04-30 18:16:04 -07:00
2023-04-22 13:09:15 +03:00
2023-05-23 17:55:59 -07:00
2023-04-30 18:16:04 -07:00
2023-04-30 18:16:04 -07:00
2023-04-30 18:16:04 -07:00
2023-05-23 17:55:59 -07:00
2023-04-30 18:16:04 -07:00
2023-04-30 18:16:04 -07:00
2023-04-23 21:06:21 +03:00
2023-04-23 21:06:21 +03:00
2023-05-23 17:55:59 -07:00
2023-03-17 17:50:25 +01:00
2023-04-28 13:24:43 -07:00
2023-05-26 21:42:19 -07:00
2023-04-30 18:16:04 -07:00
2022-04-15 17:01:01 -05:00