| ... | ... | @@ -53,6 +53,14 @@ pub fn hashString(s: []const u8) u32 { |
| 53 | 53 | return @as(u32, @truncate(std.hash.Wyhash.hash(0, s))); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | /// Deprecated in favor of `ArrayHashMapWithAllocator` (no code changes needed) |
| 57 | /// or `ArrayHashMapUnmanaged` (will need to update callsites to pass an |
| 58 | /// allocator). After Zig 0.14.0 is released, `ArrayHashMapWithAllocator` will |
| 59 | /// be removed and `ArrayHashMapUnmanaged` will be a deprecated alias. After |
| 60 | /// Zig 0.15.0 is released, the deprecated alias `ArrayHashMapUnmanaged` will |
| 61 | /// be removed. |
| 62 | pub const ArrayHashMap = ArrayHashMapWithAllocator; |
| 63 | |
| 56 | 64 | /// A hash table of keys and values, each stored sequentially. |
| 57 | 65 | /// |
| 58 | 66 | /// Insertion order is preserved. In general, this data structure supports the same |
| ... | ... | @@ -67,7 +75,7 @@ pub fn hashString(s: []const u8) u32 { |
| 67 | 75 | /// |
| 68 | 76 | /// See `ArrayHashMapUnmanaged` for a variant of this data structure that accepts an |
| 69 | 77 | /// `Allocator` as a parameter when needed rather than storing it. |
| 70 | | pub fn ArrayHashMap( |
| 78 | pub fn ArrayHashMapWithAllocator( |
| 71 | 79 | comptime K: type, |
| 72 | 80 | comptime V: type, |
| 73 | 81 | /// A namespace that provides these two functions: |