From 2bd450ac6074e658c690e4c0e881c46f5396d75d Mon Sep 17 00:00:00 2001 From: Rene Schallner Date: Sat, 22 Feb 2025 12:38:28 +0100 Subject: [PATCH] fix mustache.zig for current zig master (0.14.x) --- .gitignore | 1 + src/mustache.zig | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 6d2d37c1..158e9646 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ zig-out/ zig-cache/ +.zig-cache/ *.tar.gz flake.lock.bak tmp/ diff --git a/src/mustache.zig b/src/mustache.zig index 26709108..761b25f2 100644 --- a/src/mustache.zig +++ b/src/mustache.zig @@ -213,7 +213,7 @@ fn fiobjectify( }, .error_set => return fiobjectify(@as([]const u8, @errorName(value))), .pointer => |ptr_info| switch (ptr_info.size) { - .One => switch (@typeInfo(ptr_info.child)) { + .one => switch (@typeInfo(ptr_info.child)) { .array => { const Slice = []const std.meta.Elem(ptr_info.child); return fiobjectify(@as(Slice, value)); @@ -224,7 +224,7 @@ fn fiobjectify( }, }, // TODO: .Many when there is a sentinel (waiting for https://github.com/ziglang/zig/pull/3972) - .Slice => { + .slice => { // std.debug.print("new slice\n", .{}); if (ptr_info.child == u8 and std.unicode.utf8ValidateSlice(value)) { return fio.fiobj_str_new(util.toCharPtr(value), value.len);