mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
std: remove managed array hash map variants
And deprecate all the API names except for: * `std.array_hash_map.Auto` * `std.array_hash_map.String` * `std.array_hash_map.Custom`
This commit is contained in:
@@ -138,7 +138,7 @@ const Contents = struct {
|
||||
};
|
||||
|
||||
const HashToContents = std.StringHashMap(Contents);
|
||||
const TargetToHash = std.ArrayHashMap(DestTarget, []const u8, DestTarget.HashContext, true);
|
||||
const TargetToHash = std.array_hash_map.Custom(DestTarget, []const u8, DestTarget.HashContext, true);
|
||||
const PathTable = std.StringHashMap(*TargetToHash);
|
||||
|
||||
pub fn main(init: std.process.Init) !void {
|
||||
@@ -239,11 +239,11 @@ pub fn main(init: std.process.Init) !void {
|
||||
const path_gop = try path_table.getOrPut(rel_path);
|
||||
const target_to_hash = if (path_gop.found_existing) path_gop.value_ptr.* else blk: {
|
||||
const ptr = try arena.create(TargetToHash);
|
||||
ptr.* = TargetToHash.init(arena);
|
||||
ptr.* = .empty;
|
||||
path_gop.value_ptr.* = ptr;
|
||||
break :blk ptr;
|
||||
};
|
||||
try target_to_hash.putNoClobber(dest_target, hash);
|
||||
try target_to_hash.putNoClobber(arena, dest_target, hash);
|
||||
},
|
||||
else => std.debug.print("warning: weird file: {s}\n", .{full_path}),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user