diff options
Diffstat (limited to 'tool')
-rw-r--r-- | tool/znk.zig | 4 |
1 files changed, 2 insertions, 2 deletions
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 = | |||
38 | 38 | ||
39 | pub fn main() anyerror!void { | 39 | pub fn main() anyerror!void { |
40 | var general_purpose_allocator = std.heap.GeneralPurposeAllocator(.{}){}; | 40 | var general_purpose_allocator = std.heap.GeneralPurposeAllocator(.{}){}; |
41 | defer std.debug.assert(!general_purpose_allocator.deinit()); | 41 | defer std.debug.assert(general_purpose_allocator.deinit() == .ok); |
42 | const gpa = general_purpose_allocator.allocator(); | 42 | const gpa = general_purpose_allocator.allocator(); |
43 | 43 | ||
44 | var arena_instance = std.heap.ArenaAllocator.init(gpa); | 44 | var arena_instance = std.heap.ArenaAllocator.init(gpa); |
@@ -475,7 +475,7 @@ fn PrefixKeyGenerator(comptime EntropyReaderType: type) type { | |||
475 | 475 | ||
476 | fn toUpper(allocator: Allocator, slice: []const u8) ![]u8 { | 476 | fn toUpper(allocator: Allocator, slice: []const u8) ![]u8 { |
477 | const result = try allocator.alloc(u8, slice.len); | 477 | const result = try allocator.alloc(u8, slice.len); |
478 | for (slice) |c, i| result[i] = ascii.toUpper(c); | 478 | for (slice, 0..) |c, i| result[i] = ascii.toUpper(c); |
479 | return result; | 479 | return result; |
480 | } | 480 | } |
481 | 481 | ||