mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-23 18:21:13 +08:00
fix: 修复测试的 clippy lint 警告
This commit is contained in:
@@ -162,7 +162,7 @@ impl JsObject {
|
|||||||
let self_ptr = self as *const JsObject;
|
let self_ptr = self as *const JsObject;
|
||||||
while cursor.is_object() {
|
while cursor.is_object() {
|
||||||
let cursor_ptr = cursor.as_js_object_ptr();
|
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");
|
return Err("cyclic __proto__ value");
|
||||||
}
|
}
|
||||||
let obj = unsafe { &*cursor_ptr };
|
let obj = unsafe { &*cursor_ptr };
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ impl Vm {
|
|||||||
let new_shape_id = shape::make_shape(obj.shape_id(), prop_name_si);
|
let new_shape_id = shape::make_shape(obj.shape_id(), prop_name_si);
|
||||||
obj.set_shape_id(new_shape_id);
|
obj.set_shape_id(new_shape_id);
|
||||||
obj.set_prop_count(new_offset + 1);
|
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();
|
obj.bump_generation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -395,7 +395,7 @@ impl Vm {
|
|||||||
let new_shape_id = shape::make_shape(obj.shape_id(), prop_name_si);
|
let new_shape_id = shape::make_shape(obj.shape_id(), prop_name_si);
|
||||||
obj.set_shape_id(new_shape_id);
|
obj.set_shape_id(new_shape_id);
|
||||||
obj.set_prop_count(new_offset + 1);
|
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();
|
obj.bump_generation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user