From f6a4516d667f7cf000fb2e3123d29079a5ced272 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Fri, 14 Apr 2023 03:58:38 -0700 Subject: Upgrade Zig (#2656) * Upgrade Zig * Don't add `d` files in github actions * Revert "Don't add `d` files in github actions" This reverts commit 446e2dd6743da08ec4136233fdc9179dbbf58fca. --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> --- src/string_immutable.zig | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/string_immutable.zig') diff --git a/src/string_immutable.zig b/src/string_immutable.zig index 44d64dc49..887d819a1 100644 --- a/src/string_immutable.zig +++ b/src/string_immutable.zig @@ -24,7 +24,7 @@ pub inline fn contains(self: string, str: string) bool { } pub fn toUTF16Literal(comptime str: []const u8) []const u16 { - comptime { + return comptime brk: { comptime var output: [str.len]u16 = undefined; for (str, 0..) |c, i| { @@ -34,9 +34,8 @@ pub fn toUTF16Literal(comptime str: []const u8) []const u16 { const Static = struct { pub const literal: []const u16 = output[0..]; }; - - return Static.literal; - } + break :brk Static.literal; + }; } const OptionalUsize = std.meta.Int(.unsigned, @bitSizeOf(usize) - 1); -- cgit v1.2.3