From e33788715ce08f9410290dcea9ca0ddb26692eed Mon Sep 17 00:00:00 2001 From: Rutger Broekhoff Date: Wed, 1 Nov 2023 16:48:02 +0100 Subject: Update for Zig 0.11.0 --- tool/znk.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tool') diff --git a/tool/znk.zig b/tool/znk.zig index fcd03ff..554f191 100644 --- a/tool/znk.zig +++ b/tool/znk.zig @@ -38,7 +38,7 @@ const usage = pub fn main() anyerror!void { var general_purpose_allocator = std.heap.GeneralPurposeAllocator(.{}){}; - defer std.debug.assert(!general_purpose_allocator.deinit()); + defer std.debug.assert(general_purpose_allocator.deinit() == .ok); const gpa = general_purpose_allocator.allocator(); var arena_instance = std.heap.ArenaAllocator.init(gpa); @@ -475,7 +475,7 @@ fn PrefixKeyGenerator(comptime EntropyReaderType: type) type { fn toUpper(allocator: Allocator, slice: []const u8) ![]u8 { const result = try allocator.alloc(u8, slice.len); - for (slice) |c, i| result[i] = ascii.toUpper(c); + for (slice, 0..) |c, i| result[i] = ascii.toUpper(c); return result; } -- cgit v1.2.3