mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
deinit a string that has been trimmed to nothing
This commit is contained in:
parent
57b2dcc201
commit
bf29639d87
1 changed files with 1 additions and 0 deletions
|
@ -1510,6 +1510,7 @@ pub fn strTrim(string: RocStr) callconv(.C) RocStr {
|
|||
const original_len = string.len();
|
||||
|
||||
if (original_len == leading_bytes) {
|
||||
string.deinit();
|
||||
return RocStr.empty();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue