misc: commit things at random

This commit is contained in:
torque 2023-11-23 18:38:03 -08:00
parent bd079b42d9
commit 0f4a9fcaa7
Signed by: torque
SSH Key Fingerprint: SHA256:nCrXefBNo6EbjNSQhv0nXmEg/VuNq3sMF5b8zETw3Tk
2 changed files with 6 additions and 6 deletions

View File

@ -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);
}, },

View File

@ -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| {