* Remove flag in a test

* Get this test file to run in jest again

* Fixes #9563

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
This commit is contained in:
Jarred Sumner
2024-03-22 07:50:00 -07:00
committed by GitHub
parent f90bb7719b
commit be4b47d49d
5 changed files with 49 additions and 38 deletions

View File

@@ -295,6 +295,10 @@ pub const String = extern struct {
return this.tag == Tag.ZigString and this.value.ZigString.isGloballyAllocated();
}
pub fn ensureHash(this: String) void {
if (this.tag == .WTFStringImpl) this.value.WTFStringImpl.ensureHash();
}
pub fn toOwnedSlice(this: String, allocator: std.mem.Allocator) ![]u8 {
switch (this.tag) {
.ZigString => return try this.value.ZigString.toOwnedSlice(allocator),