bump to zig 0.14.dev
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 53s

This commit is contained in:
2024-11-16 21:06:42 +01:00
parent ace97e4bfc
commit dda2199706
4 changed files with 8 additions and 8 deletions

View File

@@ -9,7 +9,7 @@ pub const std_options: std.Options = .{
// zlog defaultLog function replacement, which adjusts the surrounding contents of every std.log message.
fn logFn(
comptime message_level: std.log.Level,
comptime scope: @Type(.EnumLiteral),
comptime scope: @Type(.enum_literal),
comptime format: []const u8,
args: anytype,
) void {
@@ -71,7 +71,7 @@ fn inner_format(object: anytype, comptime fmt: []const u8, options: std.fmt.Form
const Object = @TypeOf(object);
const object_info = @typeInfo(Object);
switch (object_info) {
.Struct => |s| {
.@"struct" => |s| {
try writer.writeAll(@typeName(Object));
try writer.writeAll(" = struct {\n");
inline for (s.fields) |field| {
@@ -87,7 +87,7 @@ fn inner_format(object: anytype, comptime fmt: []const u8, options: std.fmt.Form
try writer.writeAll("\t" ** depth);
try writer.writeAll("}");
},
.Enum => |e| {
.@"enum" => |e| {
try writer.writeAll(@typeName(Object));
try writer.writeAll(" = enum {\n");
inline for (e.fields) |field| {
@@ -101,14 +101,14 @@ fn inner_format(object: anytype, comptime fmt: []const u8, options: std.fmt.Form
},
// TODO: implement prett_printing for other user defined types (`union` and `vector`)
// TODO: recognize []const u8 types and print them as strings
.Array => |a| {
.array => |a| {
if (a.child == @TypeOf([:0]const u8)) {
try std.fmt.format(writer, "\"{s}\"", .{object});
} else {
try std.fmt.format(writer, "[]{s}: {any}", .{ @typeName(a.child), object });
}
},
.Vector => |v| {
.vector => |v| {
if (v.child == @TypeOf([:0]const u8)) {
try std.fmt.format(writer, "\"{s}\"", .{object});
} else {