Skip to content

Commit

Permalink
Removing inline trim to clean up helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
BitlyTwiser committed Sep 15, 2024
1 parent f20a082 commit 0f622ed
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/root.zig
Original file line number Diff line number Diff line change
Expand Up @@ -421,11 +421,13 @@ pub fn Ymlz(comptime Destination: type) type {
_ = self;

// Trim spaces from value
return std.mem.trim(u8, switch (expression.value) {
const value = switch (expression.value) {
.Simple => expression.value.Simple,
.KV => expression.value.KV.value,
else => @panic("Not implemeted for " ++ @typeName(@TypeOf(expression.value))),
}, " ");
};

return std.mem.trim(u8, value, " ");
}

fn getExpressionValue(self: *Self, expression: Expression) []const u8 {
Expand Down

0 comments on commit 0f622ed

Please sign in to comment.