Skip to content

Commit 8f943b3

Browse files
r00ster91joachimschmidt557
authored andcommitted
style: add missing comma
This is really minor but the issue this fixes is that if you copy-paste this output of `--show-builtin` into your `build.zig` for example then the formatter will format ``` pub const os = std.Target.Os{ .tag = .freestanding, .version_range = .{ .none = {} } }; ``` to ``` pub const os = std.Target.Os{ .tag = .freestanding, .version_range = .{ .none = {} } }; ``` which doesn't match the output. With this comma, the output will stay the way it is after a `zig fmt`.
1 parent e867127 commit 8f943b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Compilation.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4812,7 +4812,7 @@ pub fn generateBuiltinZigSource(comp: *Compilation, allocator: Allocator) Alloca
48124812
);
48134813

48144814
switch (target.os.getVersionRange()) {
4815-
.none => try buffer.appendSlice(" .none = {} }\n"),
4815+
.none => try buffer.appendSlice(" .none = {} },\n"),
48164816
.semver => |semver| try buffer.writer().print(
48174817
\\ .semver = .{{
48184818
\\ .min = .{{

0 commit comments

Comments
 (0)