commit 1cffb3d53ddab81920b42b1a8a671eea4e41fa7b
parent 8313cbfbe84365b8846d53df532b374923016631
Author: Drew DeVault <sir@cmpwn.com>
Date: Sun, 7 Feb 2021 12:58:44 -0500
strings::concat: use from_utf8_unsafe
The inputs are hare strings so we can assume that it's valid
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/strings/concat.ha b/strings/concat.ha
@@ -10,7 +10,7 @@ export fn concat(strs: str...) str = {
j += len(strs[i]);
};
append(new, 0u8);
- return from_utf8(new[..z]);
+ return from_utf8_unsafe(new[..z]);
};
@test fn concat() void = {