From c7b8b22cf7fcc8c124b606fc16ff346982a43546 Mon Sep 17 00:00:00 2001 From: pjh456 <147148383@qq.com> Date: Fri, 5 Jun 2026 21:31:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=9A=84=20clippy=20lint=20=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/oxide_vm/src/object.rs | 2 +- crates/oxide_vm/src/vm.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/oxide_vm/src/object.rs b/crates/oxide_vm/src/object.rs index cf4b8a6f..15821d7b 100644 --- a/crates/oxide_vm/src/object.rs +++ b/crates/oxide_vm/src/object.rs @@ -162,7 +162,7 @@ impl JsObject { let self_ptr = self as *const JsObject; while cursor.is_object() { let cursor_ptr = cursor.as_js_object_ptr(); - if cursor_ptr == self_ptr as *mut JsObject { + if std::ptr::eq(cursor_ptr, self_ptr) { return Err("cyclic __proto__ value"); } let obj = unsafe { &*cursor_ptr }; diff --git a/crates/oxide_vm/src/vm.rs b/crates/oxide_vm/src/vm.rs index 9fb75de0..fd8433b0 100644 --- a/crates/oxide_vm/src/vm.rs +++ b/crates/oxide_vm/src/vm.rs @@ -356,7 +356,7 @@ impl Vm { let new_shape_id = shape::make_shape(obj.shape_id(), prop_name_si); obj.set_shape_id(new_shape_id); obj.set_prop_count(new_offset + 1); - obj.set_prop_expand(new_offset, self.regs[a], &self.epoch.bump()); + obj.set_prop_expand(new_offset, self.regs[a], self.epoch.bump()); obj.bump_generation(); } } @@ -395,7 +395,7 @@ impl Vm { let new_shape_id = shape::make_shape(obj.shape_id(), prop_name_si); obj.set_shape_id(new_shape_id); obj.set_prop_count(new_offset + 1); - obj.set_prop_expand(new_offset, self.regs[b], &self.epoch.bump()); + obj.set_prop_expand(new_offset, self.regs[b], self.epoch.bump()); obj.bump_generation(); } }