Skip to content

Commit a73c942

Browse files
authored
Merge pull request #44 from francisqureshi/zig-master-fix
zig master 0.16.0-dev.2905+5d71e3051 minor updates
2 parents cf50bd5 + 39726b8 commit a73c942

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/array.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub fn parse(ctx: *parser.Context) !?*value.ValueList {
1313
var ar = try ctx.alloc.create(value.ValueList);
1414
errdefer ctx.alloc.destroy(ar);
1515

16-
ar.* = .{};
16+
ar.* = .empty;
1717
errdefer ar.deinit(ctx.alloc);
1818

1919
while (true) {

src/serialize/root.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const SerializerState = struct {
1717
fn init(allocator: Allocator) Self {
1818
return Self{
1919
.allocator = allocator,
20-
.table_comp = .{},
20+
.table_comp = .empty,
2121
};
2222
}
2323

src/string.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub fn parseSingleLine(ctx: *Context) !?[]const u8 {
2222
}
2323

2424
pub fn parseString(ctx: *Context, delimiter: *const Delimiter) !?[]const u8 {
25-
var output: Buffer = .{};
25+
var output: Buffer = .empty;
2626
errdefer output.deinit(ctx.alloc);
2727

2828
while (ctx.current()) |c| {

src/struct_mapping.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub const Context = struct {
1313
pub fn init(alloc: std.mem.Allocator) Context {
1414
return .{
1515
.alloc = alloc,
16-
.field_path = .{},
16+
.field_path = .empty,
1717
};
1818
}
1919

src/table.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ fn tableAdvance(ctx: *parser.Context, table: *Table, key: parser.String, new_arr
109109
if (new_array_item) {
110110
var list = try ctx.alloc.create(ValueList);
111111
errdefer ctx.alloc.destroy(list);
112-
list.* = .{};
112+
list.* = .empty;
113113
try list.append(ctx.alloc, new_value);
114114
new_value = Value{ .array = list };
115115
}

0 commit comments

Comments
 (0)