clippy: explicit ptr addrs comparision
relevant for wide pointers i.e. pointers with metadata
This commit is contained in:
@@ -227,7 +227,7 @@ impl<T: ?Sized + PartialOrd> PartialOrd for TypedArenaPtr<T> {
|
||||
|
||||
impl<T: ?Sized + PartialEq> PartialEq for TypedArenaPtr<T> {
|
||||
fn eq(&self, other: &TypedArenaPtr<T>) -> bool {
|
||||
self.0 == other.0 || **self == **other
|
||||
std::ptr::addr_eq(self.0.as_ptr(), other.0.as_ptr()) || **self == **other
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ impl<T: ?Sized, M: ?Sized> RcuRef<T, M> {
|
||||
}
|
||||
|
||||
pub fn ptr_eq(this: &Self, other: &Self) -> bool {
|
||||
this.data == other.data
|
||||
std::ptr::addr_eq(this.data.as_ptr(), other.data.as_ptr())
|
||||
}
|
||||
|
||||
pub fn clone(this: &Self) -> Self {
|
||||
|
||||
Reference in New Issue
Block a user