Avoid entraining various Debug impls in release builds.

MozReview-Commit-ID: Lp9i9EI5qdU
This commit is contained in:
Bobby Holley 2018-01-12 15:22:07 -08:00
parent 6ca651c0c8
commit f858ce91e8
9 changed files with 35 additions and 49 deletions

View file

@ -746,18 +746,9 @@ pub trait TElement
/// element-backed pseudo-element, in which case we return the originating
/// element.
fn rule_hash_target(&self) -> Self {
if let Some(pseudo) = self.implemented_pseudo_element() {
match self.closest_non_native_anonymous_ancestor() {
Some(e) => e,
None => {
panic!(
"Trying to collect rules for a detached pseudo-element: \
{:?} {:?}",
pseudo,
self,
)
}
}
if self.implemented_pseudo_element().is_some() {
self.closest_non_native_anonymous_ancestor()
.expect("Trying to collect rules for a detached pseudo-element")
} else {
*self
}