fix: 越界增长置洞循环改迭代器消除 clippy 告警

This commit is contained in:
2026-09-29 12:14:15 +00:00
parent 3aadf1c163
commit 0c4fed0373
+2 -2
View File
@@ -454,8 +454,8 @@ impl JsObject {
// pos 槽随后覆盖写,hole 标记由 clear_hole_marker 清除。
if old < pos {
let meta = self.ensure_array_elements_meta();
for idx in old..pos {
meta[idx] = Some(PropMetaEntry::hole());
for entry in meta.iter_mut().take(pos).skip(old) {
*entry = Some(PropMetaEntry::hole());
}
}
}