From 7bd6a1f86d99c1374cb1eb15ff263dc352a8837b Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Sun, 9 Apr 2023 05:39:05 -0700 Subject: Remove usages of `void{}` in favor of `{}` See https://github.com/ziglang/zig/issues/15213 --- src/string_immutable.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/string_immutable.zig') 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 = "'" }, '<' => Escaped(u8){ .static = "<" }, '>' => Escaped(u8){ .static = ">" }, - 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() }; -- cgit v1.2.3