aboutsummaryrefslogtreecommitdiffstats
path: root/components/servo_arc
diff options
context:
space:
mode:
Diffstat (limited to 'components/servo_arc')
-rw-r--r--components/servo_arc/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/servo_arc/lib.rs b/components/servo_arc/lib.rs
index 49a04dea1fc..7d17c26cd51 100644
--- a/components/servo_arc/lib.rs
+++ b/components/servo_arc/lib.rs
@@ -389,11 +389,11 @@ impl<T: ?Sized> Drop for Arc<T> {
impl<T: ?Sized + PartialEq> PartialEq for Arc<T> {
fn eq(&self, other: &Arc<T>) -> bool {
- *(*self) == *(*other)
+ Self::ptr_eq(self, other) || *(*self) == *(*other)
}
fn ne(&self, other: &Arc<T>) -> bool {
- *(*self) != *(*other)
+ !Self::ptr_eq(self, other) && *(*self) != *(*other)
}
}
impl<T: ?Sized + PartialOrd> PartialOrd for Arc<T> {