Remove usages of void{} in favor of {}

See https://github.com/ziglang/zig/issues/15213
This commit is contained in:
Jarred Sumner
2023-04-09 05:39:05 -07:00
parent 1e717dd941
commit 7bd6a1f86d
37 changed files with 201 additions and 201 deletions

View File

@@ -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 = "&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() };