Jakub Konka ee6f7fee29 libstd: add ArrayHashMap.popOrNull function
which internally calls `ArrayHashMap.pop`, however, returns `?KV`
instead and performs the bounds checking automatically.

This function correponds to `ArrayList.popOrNull` and is meant
to fill the gap for situations where we want the quick lookup offered
by the hash map with elegant ability to iterate and pop of the
container with automatic bound checking that plugs in well with
a `while`-loop such as

```zig
var map = std.ArrayHashMap(K, V).init(allocator);
map.deinit();
while (map.popOrNull()) |entry| {
  // ... do something
}
assert(map.count() == 0);
```
2021-08-04 09:47:42 +02:00
..
2021-06-30 21:49:00 -05:00
2021-07-28 21:39:36 +03:00
2021-06-21 17:03:03 -07:00
2021-06-21 17:03:03 -07:00
2021-06-21 17:03:03 -07:00
2021-07-04 16:15:23 +02:00
2021-06-17 16:37:38 -04:00
2020-12-31 15:45:24 -08:00
2021-06-30 21:49:38 -05:00
2020-12-31 15:45:24 -08:00
2021-06-21 17:03:03 -07:00
2021-06-30 21:49:00 -05:00
2021-05-08 15:15:30 +03:00
2020-12-31 15:45:24 -08:00
2021-06-21 17:03:03 -07:00
2021-06-21 17:03:03 -07:00
2020-12-31 15:45:24 -08:00
2021-05-08 15:15:30 +03:00
2021-07-28 21:39:36 +03:00
2020-12-31 15:45:24 -08:00
2021-06-21 17:03:03 -07:00
2021-06-21 17:03:03 -07:00
2021-07-19 12:55:05 +03:00
2021-06-10 20:13:43 -07:00
2021-06-21 17:03:03 -07:00
2021-06-21 17:03:03 -07:00
2021-07-20 10:22:06 +02:00
2021-06-21 17:03:03 -07:00
2021-07-08 14:30:45 -04:00
2021-06-21 17:03:03 -07:00
2021-07-11 01:58:26 -04:00
2021-05-08 15:15:30 +03:00
2021-07-15 20:37:16 +03:00