Cleanup Node::summarize.

This commit is contained in:
Ms2ger 2014-12-05 15:00:54 +01:00
parent 54c0601950
commit 1611b8d0a8

View file

@ -848,11 +848,9 @@ impl<'a> NodeHelpers<'a> for JSRef<'a, Node> {
publicId: "".to_string(),
systemId: "".to_string(),
attrs: if self.is_element() {
let elem: JSRef<Element> = ElementCast::to_ref(self).unwrap();
elem.summarize()
} else {
vec!()
attrs: match ElementCast::to_ref(self) {
Some(element) => element.summarize(),
None => vec!(),
},
isDocumentElement: