Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/array.zig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub fn parse(ctx: *parser.Context) !?*value.ValueList {
var ar = try ctx.alloc.create(value.ValueList);
errdefer ctx.alloc.destroy(ar);

ar.* = .{};
ar.* = .empty;
errdefer ar.deinit(ctx.alloc);

while (true) {
Expand Down
2 changes: 1 addition & 1 deletion src/serialize/root.zig
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const SerializerState = struct {
fn init(allocator: Allocator) Self {
return Self{
.allocator = allocator,
.table_comp = .{},
.table_comp = .empty,
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/string.zig
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub fn parseSingleLine(ctx: *Context) !?[]const u8 {
}

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

while (ctx.current()) |c| {
Expand Down
2 changes: 1 addition & 1 deletion src/struct_mapping.zig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub const Context = struct {
pub fn init(alloc: std.mem.Allocator) Context {
return .{
.alloc = alloc,
.field_path = .{},
.field_path = .empty,
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/table.zig
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ fn tableAdvance(ctx: *parser.Context, table: *Table, key: parser.String, new_arr
if (new_array_item) {
var list = try ctx.alloc.create(ValueList);
errdefer ctx.alloc.destroy(list);
list.* = .{};
list.* = .empty;
try list.append(ctx.alloc, new_value);
new_value = Value{ .array = list };
}
Expand Down
Loading