misc: commit things at random
This commit is contained in:
parent
bd079b42d9
commit
0f4a9fcaa7
@ -199,9 +199,9 @@ pub const State = struct {
|
|||||||
.in_line => |in_line| switch (in_line) {
|
.in_line => |in_line| switch (in_line) {
|
||||||
.empty => unreachable,
|
.empty => unreachable,
|
||||||
inline .line_string, .space_string, .concat_string => |str, tag| {
|
inline .line_string, .space_string, .concat_string => |str, tag| {
|
||||||
if (tag == .line_string)
|
if (comptime tag == .line_string)
|
||||||
try state.string_builder.append(arena_alloc, '\n');
|
try state.string_builder.append(arena_alloc, '\n');
|
||||||
if (tag == .space_string)
|
if (comptime tag == .space_string)
|
||||||
try state.string_builder.append(arena_alloc, ' ');
|
try state.string_builder.append(arena_alloc, ' ');
|
||||||
try state.string_builder.appendSlice(arena_alloc, str);
|
try state.string_builder.appendSlice(arena_alloc, str);
|
||||||
},
|
},
|
||||||
|
@ -223,10 +223,10 @@ pub const Value = union(enum) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// we could iterate over each map key and do an exhaustive
|
// TODO: consider not cloning the map here. This would
|
||||||
// comparison with each struct field name. This would save
|
// result in the requirement that the raw value object
|
||||||
// memory and it would probably be a fair amount faster for
|
// not be used after it has been converted to a type,
|
||||||
// small structs.
|
// based on the parse options.
|
||||||
var clone = try map.clone();
|
var clone = try map.clone();
|
||||||
defer clone.deinit();
|
defer clone.deinit();
|
||||||
inline for (stt.fields) |field| {
|
inline for (stt.fields) |field| {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user