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