mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
string: use correct allocator in replace (#2405)
`replace` accepts an Allocator but uses `mem` instead.
This commit is contained in:
@@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user