diff --git a/components/script/dom/bindings/js.rs b/components/script/dom/bindings/js.rs index 66d3074edc73..8940ca7bd0ab 100644 --- a/components/script/dom/bindings/js.rs +++ b/components/script/dom/bindings/js.rs @@ -268,10 +268,10 @@ impl PartialEq for MutHeap> { } } -impl PartialEq for MutHeap> { +impl PartialEq for MutHeap> { fn eq(&self, other: &T) -> bool { unsafe { - *self.val.get() == JS::from_ref(other) + **self.val.get() == *other } } } @@ -349,7 +349,7 @@ impl PartialEq for MutNullableHeap> { impl<'a, T: Reflectable> PartialEq> for MutNullableHeap> { fn eq(&self, other: &Option<&T>) -> bool { unsafe { - *self.ptr.get() == other.map(|p| JS::from_ref(p)) + *self.ptr.get() == other.map(JS::from_ref) } } }