aboutsummaryrefslogtreecommitdiff
path: root/src/string_immutable.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/string_immutable.zig')
-rw-r--r--src/string_immutable.zig7
1 files changed, 3 insertions, 4 deletions
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);