string: use correct allocator in replace (#2405)

`replace` accepts an Allocator but uses `mem` instead.
This commit is contained in:
konimarti
2025-08-16 03:41:59 +02:00
committed by GitHub
parent b52ab886d2
commit e35dbd29fb
2 changed files with 2 additions and 1 deletions

View File

@@ -187,7 +187,7 @@ fn String String.replace(self, Allocator allocator, String needle, String new_st
@pool()
{
String[] split = self.tsplit(needle);
return dstring::join(tmem, split, new_str).copy_str(mem);
return dstring::join(tmem, split, new_str).copy_str(allocator);
};
}