From eb375525366ba51c3f626cf9b27d97fc81e2c938 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Wed, 5 Mar 2025 03:17:54 +0000 Subject: Remove numerous things deprecated during the 0.14 release cycle Basically everything that has a direct replacement or no uses left. Notable omissions: - std.ArrayHashMap: Too much fallout, needs a separate cleanup. - std.debug.runtime_safety: Too much fallout. - std.heap.GeneralPurposeAllocator: Lots of references to it remain, not a simple find and replace as "debug allocator" is not equivalent to "general purpose allocator". - std.io.Reader: Is being reworked at the moment. - std.unicode.utf8Decode(): No replacement, needs a new API first. - Manifest backwards compat options: Removal would break test data used by TestFetchBuilder. - panic handler needs to be a namespace: Many tests still rely on it being a function, needs a separate cleanup. --- src/InternPool.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/InternPool.zig') diff --git a/src/InternPool.zig b/src/InternPool.zig index 8471a1ad9e..ba5725ec30 100644 --- a/src/InternPool.zig +++ b/src/InternPool.zig @@ -1861,7 +1861,7 @@ pub const NullTerminatedString = enum(u32) { pub fn hash(ctx: @This(), a: NullTerminatedString) u32 { _ = ctx; - return std.hash.uint32(@intFromEnum(a)); + return std.hash.int(@intFromEnum(a)); } }; @@ -4740,7 +4740,7 @@ pub const Index = enum(u32) { pub fn hash(ctx: @This(), a: Index) u32 { _ = ctx; - return std.hash.uint32(@intFromEnum(a)); + return std.hash.int(@intFromEnum(a)); } }; @@ -12725,7 +12725,7 @@ const GlobalErrorSet = struct { name: NullTerminatedString, ) Allocator.Error!GlobalErrorSet.Index { if (name == .empty) return .none; - const hash = std.hash.uint32(@intFromEnum(name)); + const hash = std.hash.int(@intFromEnum(name)); var map = ges.shared.map.acquire(); const Map = @TypeOf(map); var map_mask = map.header().mask(); @@ -12818,7 +12818,7 @@ const GlobalErrorSet = struct { name: NullTerminatedString, ) ?GlobalErrorSet.Index { if (name == .empty) return .none; - const hash = std.hash.uint32(@intFromEnum(name)); + const hash = std.hash.int(@intFromEnum(name)); const map = ges.shared.map.acquire(); const map_mask = map.header().mask(); const names_items = ges.shared.names.acquire().view().items(.@"0"); -- cgit v1.2.3