]> git.nega.tv - josh/narcissus/commitdiff
narcissus-core: Fix clippy lint
authorJoshua Simmons <josh@nega.tv>
Sun, 31 Mar 2024 02:56:39 +0000 (04:56 +0200)
committerJoshua Simmons <josh@nega.tv>
Sun, 31 Mar 2024 02:56:39 +0000 (04:56 +0200)
engine/narcissus-core/src/ref_count.rs

index 6ec4c2dfcf02b46ef7553d06cfaf3d498d8214d0..a292da9382f13a88a0ad6ab037bfb119612da57c 100644 (file)
@@ -113,7 +113,7 @@ impl<T: ?Sized> Rc<T> {
 
     #[inline]
     pub fn ptr_eq(&self, other: &Self) -> bool {
-        self.ptr.as_ptr() == other.ptr.as_ptr()
+        std::ptr::eq(self.ptr.as_ptr(), other.ptr.as_ptr())
     }
 
     #[inline]
@@ -219,7 +219,7 @@ impl<T: ?Sized> Arc<T> {
 
     #[inline]
     pub fn ptr_eq(&self, other: &Self) -> bool {
-        self.ptr.as_ptr() == other.ptr.as_ptr()
+        std::ptr::eq(self.ptr.as_ptr(), other.ptr.as_ptr())
     }
 
     #[inline]