strings, builtin: remove strings.Builder.clear(), fix array.clear() not working in the JS backend (#23992)

This commit is contained in:
XiaoPangxie732 2025-03-22 23:24:59 +08:00 committed by GitHub
parent 20d7d9758b
commit 15c0e6f2bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 12 deletions

View file

@ -317,7 +317,7 @@ pub fn (mut a array) reverse_in_place() {
pub fn (mut a array) clear() {
#a.val.arr.make_copy()
#a.val.arr.arr.clear()
#a.val.arr.arr.length = 0
}
// reduce executes a given reducer function on each element of the array,