in PartialEq impls, use Self instead of explicitly naming the struct type

This commit is contained in:
Rohan Prinja 2015-10-22 01:05:48 +09:00
parent ab70c8c942
commit 5e8dc366de

View file

@ -261,7 +261,7 @@ impl<T: HeapGCValue> HeapSizeOf for MutHeap<T> {
} }
impl<T: Reflectable> PartialEq for MutHeap<JS<T>> { impl<T: Reflectable> PartialEq for MutHeap<JS<T>> {
fn eq(&self, other: &MutHeap<JS<T>>) -> bool { fn eq(&self, other: &Self) -> bool {
self.get().eq(&other.get()) self.get().eq(&other.get())
} }
} }
@ -344,7 +344,7 @@ impl<T: HeapGCValue> HeapSizeOf for MutNullableHeap<T> {
} }
impl<T: Reflectable> PartialEq for MutNullableHeap<JS<T>> { impl<T: Reflectable> PartialEq for MutNullableHeap<JS<T>> {
fn eq(&self, other: &MutNullableHeap<JS<T>>) -> bool { fn eq(&self, other: &Self>) -> bool {
self.get().eq(&other.get()) self.get().eq(&other.get())
} }
} }