clippy: explicit ptr addrs comparision

relevant for wide pointers i.e. pointers with metadata
This commit is contained in:
Bennet Bleßmann
2024-07-06 13:06:13 +02:00
parent 1ff995fedb
commit d2f236d116
2 changed files with 2 additions and 2 deletions

View File

@@ -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
}
}