use Arc::ptr_eq instead of manual impl

This commit is contained in:
Dmitry Stepanov
2026-06-14 20:03:51 +03:00
parent 982302e156
commit 95298bd4b7
+5 -7
View File
@@ -772,15 +772,13 @@ pub struct ContextEntry {
impl PartialEq for ContextEntry {
fn eq(&self, other: &Self) -> bool {
// Cast fat pointers to thin first.
let ptr_a = &*self.property_editor_definition_container as *const _ as *const ();
let ptr_b = &*other.property_editor_definition_container as *const _ as *const ();
self.property_editor == other.property_editor
&& self.property_name == other.property_name
&& self.property_value_type_id ==other.property_value_type_id
// Compare thin pointers.
&& std::ptr::eq(ptr_a, ptr_b)
&& self.property_value_type_id == other.property_value_type_id
&& Arc::ptr_eq(
&self.property_editor_definition_container,
&other.property_editor_definition_container,
)
}
}