aboutsummaryrefslogtreecommitdiffstats
path: root/tool/znk.zig
diff options
context:
space:
mode:
authorLibravatar Rutger Broekhoff2023-11-01 16:48:02 +0100
committerLibravatar Rutger Broekhoff2023-11-01 16:48:02 +0100
commite33788715ce08f9410290dcea9ca0ddb26692eed (patch)
treec64bce995bd38f89d855983caf929a98c5ffe825 /tool/znk.zig
parent04252bac0d7a9383f943337366d6a6631ce44e91 (diff)
downloadzig-nkeys-e33788715ce08f9410290dcea9ca0ddb26692eed.tar.gz
zig-nkeys-e33788715ce08f9410290dcea9ca0ddb26692eed.zip
Update for Zig 0.11.0
Diffstat (limited to 'tool/znk.zig')
-rw-r--r--tool/znk.zig4
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
39pub fn main() anyerror!void { 39pub 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
476fn toUpper(allocator: Allocator, slice: []const u8) ![]u8 { 476fn 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