Remove the custom PartialEq implementations on TypeId enums

https://github.com/rust-lang/rust/pull/33593 made them useless.
This commit is contained in:
Anthony Ramine 2016-05-17 15:28:51 +02:00
parent 2ab7f1366c
commit 60aaac5175
3 changed files with 3 additions and 64 deletions

View file

@ -32,7 +32,6 @@ use dom::virtualmethods::VirtualMethods;
use std::ascii::AsciiExt;
use std::borrow::ToOwned;
use std::default::Default;
use std::intrinsics;
use std::rc::Rc;
use string_cache::Atom;
use style::element_state::*;
@ -488,25 +487,3 @@ impl VirtualMethods for HTMLElement {
self.update_sequentially_focusable_status();
}
}
impl PartialEq for HTMLElementTypeId {
#[inline]
#[allow(unsafe_code)]
fn eq(&self, other: &HTMLElementTypeId) -> bool {
match (*self, *other) {
(HTMLElementTypeId::HTMLMediaElement(this_type),
HTMLElementTypeId::HTMLMediaElement(other_type)) => {
this_type == other_type
}
(HTMLElementTypeId::HTMLTableCellElement(this_type),
HTMLElementTypeId::HTMLTableCellElement(other_type)) => {
this_type == other_type
}
(_, _) => {
unsafe {
intrinsics::discriminant_value(self) == intrinsics::discriminant_value(other)
}
}
}
}
}