Skip to content

Commit

Permalink
clean code as per code review
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnirp committed Oct 25, 2015
1 parent fe59b62 commit c1abb4f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/script/dom/bindings/js.rs
Expand Up @@ -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
}
}
}
Expand Down Expand Up @@ -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)
}
}
}
Expand Down

0 comments on commit c1abb4f

Please sign in to comment.