Re: [PATCH v1 1/2] rust: sync: add `Arc::ptr_eq`

From: Martin Rodriguez Reboredo
Date: Wed May 17 2023 - 16:47:01 EST


On 5/17/23 17:08, Alice Ryhl wrote:
[...]
+
+ /// Compare whether two [`Arc`] pointers reference the same underlying object.
+ pub fn ptr_eq(this: &Self, other: &Self) -> bool {
+ core::ptr::eq(this.ptr.as_ptr(), other.ptr.as_ptr())
+ }
}
impl<T: 'static> ForeignOwnable for Arc<T> {

base-commit: ac9a78681b921877518763ba0e89202254349d1b

Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@xxxxxxxxx>