Fix String.replace not dropping temp mem.

This commit is contained in:
Christoffer Lerno
2026-01-14 22:13:15 +01:00
parent 7136b05019
commit d61beef7e0

View File

@@ -190,7 +190,7 @@ fn String join(Allocator allocator, String[] s, String joiner)
@param [&inout] allocator : `The allocator to use for the String` @param [&inout] allocator : `The allocator to use for the String`
@return "The new string with the elements replaced" @return "The new string with the elements replaced"
*> *>
fn String String.replace(self, Allocator allocator, String needle, String new_str) @nodiscard fn String String.replace(self, Allocator allocator, String needle, String new_str) @nodiscard => @pool()
{ {
Splitter s = self.tokenize_all(needle); Splitter s = self.tokenize_all(needle);
DString d; DString d;