mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
clean code as per code review
This commit is contained in:
parent
fe59b62db7
commit
c1abb4fdb2
1 changed files with 3 additions and 3 deletions
|
@ -268,10 +268,10 @@ impl<T: Reflectable> PartialEq for MutHeap<JS<T>> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T: Reflectable> PartialEq<T> for MutHeap<JS<T>> {
|
||||
impl<T: Reflectable + PartialEq> PartialEq<T> for MutHeap<JS<T>> {
|
||||
fn eq(&self, other: &T) -> bool {
|
||||
unsafe {
|
||||
*self.val.get() == JS::from_ref(other)
|
||||
**self.val.get() == *other
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -349,7 +349,7 @@ impl<T: Reflectable> PartialEq for MutNullableHeap<JS<T>> {
|
|||
impl<'a, T: Reflectable> PartialEq<Option<&'a T>> for MutNullableHeap<JS<T>> {
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue