| ... | ... | @@ -77,12 +77,15 @@ pub fn ArrayHashMap( |
| 77 | 77 | comptime Context: type, |
| 78 | 78 | comptime store_hash: bool, |
| 79 | 79 | ) type { |
| 80 | | comptime std.hash_map.verifyContext(Context, K, K, u32, true); |
| 81 | 80 | return struct { |
| 82 | 81 | unmanaged: Unmanaged, |
| 83 | 82 | allocator: Allocator, |
| 84 | 83 | ctx: Context, |
| 85 | 84 | |
| 85 | comptime { |
| 86 | std.hash_map.verifyContext(Context, K, K, u32, true); |
| 87 | } |
| 88 | |
| 86 | 89 | /// The ArrayHashMapUnmanaged type using the same settings as this managed map. |
| 87 | 90 | pub const Unmanaged = ArrayHashMapUnmanaged(K, V, Context, store_hash); |
| 88 | 91 | |
| ... | ... | @@ -470,7 +473,6 @@ pub fn ArrayHashMapUnmanaged( |
| 470 | 473 | comptime Context: type, |
| 471 | 474 | comptime store_hash: bool, |
| 472 | 475 | ) type { |
| 473 | | comptime std.hash_map.verifyContext(Context, K, K, u32, true); |
| 474 | 476 | return struct { |
| 475 | 477 | /// It is permitted to access this field directly. |
| 476 | 478 | entries: DataList = .{}, |
| ... | ... | @@ -481,6 +483,10 @@ pub fn ArrayHashMapUnmanaged( |
| 481 | 483 | /// by how many total indexes there are. |
| 482 | 484 | index_header: ?*IndexHeader = null, |
| 483 | 485 | |
| 486 | comptime { |
| 487 | std.hash_map.verifyContext(Context, K, K, u32, true); |
| 488 | } |
| 489 | |
| 484 | 490 | /// Modifying the key is allowed only if it does not change the hash. |
| 485 | 491 | /// Modifying the value is allowed. |
| 486 | 492 | /// Entry pointers become invalid whenever this ArrayHashMap is modified, |