From 29fb00a1c3a60d4faca2fb29ae56b73362baa917 Mon Sep 17 00:00:00 2001 From: Rutger Broekhoff Date: Mon, 20 Sep 2021 11:57:39 +0200 Subject: Make compatible with Zig master --- src/main.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main.zig') diff --git a/src/main.zig b/src/main.zig index a299afe..3206f45 100644 --- a/src/main.zig +++ b/src/main.zig @@ -390,7 +390,7 @@ pub fn areKeySectionContentsValid(contents: []const u8) bool { return true; } -pub fn findKeySection(line_it: *std.mem.SplitIterator) ?[]const u8 { +pub fn findKeySection(line_it: *std.mem.SplitIterator(u8)) ?[]const u8 { while (true) { const opening_line = line_it.next() orelse return null; if (!isKeySectionBarrier(opening_line, true)) continue; @@ -406,12 +406,12 @@ pub fn findKeySection(line_it: *std.mem.SplitIterator) ?[]const u8 { } pub fn parseDecoratedJwt(contents: []const u8) []const u8 { - var line_it = mem.split(contents, "\n"); + var line_it = mem.split(u8, contents, "\n"); return findKeySection(&line_it) orelse return contents; } pub fn parseDecoratedNkey(contents: []const u8) NoNkeySeedFoundError!SeedKeyPair { - var line_it = mem.split(contents, "\n"); + var line_it = mem.split(u8, contents, "\n"); var seed: ?[]const u8 = null; if (findKeySection(&line_it) != null) seed = findKeySection(&line_it); @@ -439,7 +439,7 @@ fn isValidCredsNkey(text: []const u8) bool { } fn findNkey(text: []const u8) ?[]const u8 { - var line_it = std.mem.split(text, "\n"); + var line_it = std.mem.split(u8, text, "\n"); while (line_it.next()) |line| { for (line) |c, i| { if (!ascii.isSpace(c)) { -- cgit v1.2.3