Skip to content
Permalink
Browse files

clean code as per code review

  • Loading branch information...
ajnirp committed Oct 25, 2015
1 parent fe59b62 commit c1abb4fdb2fd20556cb5399a2ceb2e2c1d662913
Showing with 3 additions and 3 deletions.
  1. +3 −3 components/script/dom/bindings/js.rs
@@ -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)
}
}
}

0 comments on commit c1abb4f

Please sign in to comment.
You can’t perform that action at this time.