fix(string): use heap allocator for ZString.copy

Use the heap allocator for ZString.copy() instead of the temp allocator
to stay consistent across the code base.

The temp allocator is used for ZString.tcopy().
This commit is contained in:
Koni Marti
2024-10-08 14:21:45 +02:00
committed by Christoffer Lerno
parent 7dfdb9d061
commit 0cc62058a9

View File

@@ -466,7 +466,7 @@ fn void String.free(&s, Allocator allocator = allocator::heap())
fn String String.tcopy(s) => s.copy(allocator::temp()) @inline;
fn String ZString.copy(z, Allocator allocator = allocator::temp())
fn String ZString.copy(z, Allocator allocator = allocator::heap())
{
return z.str_view().copy(allocator) @inline;
}