aboutsummaryrefslogtreecommitdiff
path: root/src/string_immutable.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-04-09 05:39:05 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-04-09 05:39:05 -0700
commit7bd6a1f86d99c1374cb1eb15ff263dc352a8837b (patch)
tree6b7646d6bf34ca83844f713b3be671dc71a40b37 /src/string_immutable.zig
parent1e717dd941090b5c52f36445f3a53d41e1bc7894 (diff)
downloadbun-7bd6a1f86d99c1374cb1eb15ff263dc352a8837b.tar.gz
bun-7bd6a1f86d99c1374cb1eb15ff263dc352a8837b.tar.zst
bun-7bd6a1f86d99c1374cb1eb15ff263dc352a8837b.zip
Remove usages of `void{}` in favor of `{}`
See https://github.com/ziglang/zig/issues/15213
Diffstat (limited to 'src/string_immutable.zig')
-rw-r--r--src/string_immutable.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/string_immutable.zig b/src/string_immutable.zig
index 889add550..a611b302e 100644
--- a/src/string_immutable.zig
+++ b/src/string_immutable.zig
@@ -1992,7 +1992,7 @@ pub fn escapeHTMLForLatin1Input(allocator: std.mem.Allocator, latin1: []const u8
}
if (total == len) {
- return .{ .original = void{} };
+ return .{ .original = {} };
}
var output = allo.alloc(u8, total) catch unreachable;
@@ -2013,7 +2013,7 @@ pub fn escapeHTMLForLatin1Input(allocator: std.mem.Allocator, latin1: []const u8
'\'' => Escaped(u8){ .static = "&#x27;" },
'<' => Escaped(u8){ .static = "&lt;" },
'>' => Escaped(u8){ .static = "&gt;" },
- else => Escaped(u8){ .original = void{} },
+ else => Escaped(u8){ .original = {} },
},
2 => {
const first: []const u8 = switch (latin1[0]) {
@@ -2254,7 +2254,7 @@ pub fn escapeHTMLForLatin1Input(allocator: std.mem.Allocator, latin1: []const u8
if (!any_needs_escape) {
if (comptime Environment.allow_assert) std.debug.assert(buf.capacity == 0);
- return Escaped(u8){ .original = void{} };
+ return Escaped(u8){ .original = {} };
}
return Escaped(u8){ .allocated = try buf.toOwnedSlice() };