Skip to content

Commit

Permalink
Update usage of ptr comp
Browse files Browse the repository at this point in the history
  • Loading branch information
EricLBuehler committed Feb 8, 2024
1 parent 22881f0 commit 22721da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ impl<T: ?Sized> SharedTrc<T> {
#[inline]
#[must_use]
pub fn ptr_eq(this: &Self, other: &Self) -> bool {
this.data.as_ptr() == other.data.as_ptr()
std::ptr::eq(this.data.as_ptr(), other.data.as_ptr())
}

/// Gets the raw pointer to the most inner layer of `SharedTrc`.
Expand Down Expand Up @@ -1312,7 +1312,7 @@ impl<T: ?Sized> Trc<T> {
#[inline]
#[must_use]
pub fn ptr_eq(this: &Self, other: &Self) -> bool {
this.shared.as_ptr() == other.shared.as_ptr()
std::ptr::eq(this.shared.as_ptr(), other.shared.as_ptr())
}

/// Gets the raw pointer to the most inner layer of `Trc`. This is only valid if there are at least some atomic references.
Expand Down

0 comments on commit 22721da

Please sign in to comment.