From 466faac2a507c833b282e274a28f6ae533c628f9 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Wed, 17 Dec 2014 10:42:52 +0100 Subject: Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d. --- components/script/dom/htmlserializer.rs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'components/script/dom/htmlserializer.rs') diff --git a/components/script/dom/htmlserializer.rs b/components/script/dom/htmlserializer.rs index 8a04fa717a1..bc6740658b0 100644 --- a/components/script/dom/htmlserializer.rs +++ b/components/script/dom/htmlserializer.rs @@ -11,10 +11,7 @@ use dom::characterdata::CharacterData; use dom::comment::Comment; use dom::documenttype::DocumentType; use dom::element::{Element, ElementHelpers}; -use dom::node::{Node, NodeIterator}; -use dom::node::{DoctypeNodeTypeId, DocumentFragmentNodeTypeId, CommentNodeTypeId}; -use dom::node::{DocumentNodeTypeId, ElementNodeTypeId, ProcessingInstructionNodeTypeId}; -use dom::node::{TextNodeTypeId, NodeHelpers}; +use dom::node::{Node, NodeHelpers, NodeTypeId, NodeIterator}; use dom::processinginstruction::ProcessingInstruction; use dom::text::Text; @@ -30,29 +27,29 @@ pub fn serialize(iterator: &mut NodeIterator) -> String { html.push_str(">"); } match node.type_id() { - ElementNodeTypeId(..) => { + NodeTypeId::Element(..) => { let elem: JSRef = ElementCast::to_ref(node).unwrap(); serialize_elem(elem, &mut open_elements, &mut html) } - CommentNodeTypeId => { + NodeTypeId::Comment => { let comment: JSRef = CommentCast::to_ref(node).unwrap(); serialize_comment(comment, &mut html) } - TextNodeTypeId => { + NodeTypeId::Text => { let text: JSRef = TextCast::to_ref(node).unwrap(); serialize_text(text, &mut html) } - DoctypeNodeTypeId => { + NodeTypeId::DocumentType => { let doctype: JSRef = DocumentTypeCast::to_ref(node).unwrap(); serialize_doctype(doctype, &mut html) } - ProcessingInstructionNodeTypeId => { + NodeTypeId::ProcessingInstruction => { let processing_instruction: JSRef = ProcessingInstructionCast::to_ref(node).unwrap(); serialize_processing_instruction(processing_instruction, &mut html) } - DocumentFragmentNodeTypeId => {} - DocumentNodeTypeId => { + NodeTypeId::DocumentFragment => {} + NodeTypeId::Document => { panic!("It shouldn't be possible to serialize a document node") } } -- cgit v1.2.3