From 5e7701f334afe7f9812b4ca43e4cf1b8a7160564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Thu, 26 Mar 2020 23:21:50 +0100 Subject: [PATCH] minidom: Remove remaining Comment bits in node MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They were hidden behind the flag and not showing up in tests. Signed-off-by: Maxime “pep” Buquet --- minidom-rs/src/node.rs | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/minidom-rs/src/node.rs b/minidom-rs/src/node.rs index ac090de0..501b22b5 100644 --- a/minidom-rs/src/node.rs +++ b/minidom-rs/src/node.rs @@ -23,9 +23,6 @@ pub enum Node { Element(Element), /// A text node. Text(String), - #[cfg(feature = "comments")] - /// A comment node. - Comment(String), } impl Node { @@ -47,8 +44,6 @@ impl Node { match *self { Node::Element(ref e) => Some(e), Node::Text(_) => None, - #[cfg(feature = "comments")] - Node::Comment(_) => None, } } @@ -70,8 +65,6 @@ impl Node { match *self { Node::Element(ref mut e) => Some(e), Node::Text(_) => None, - #[cfg(feature = "comments")] - Node::Comment(_) => None, } } @@ -93,8 +86,6 @@ impl Node { match self { Node::Element(e) => Some(e), Node::Text(_) => None, - #[cfg(feature = "comments")] - Node::Comment(_) => None, } } @@ -116,8 +107,6 @@ impl Node { match *self { Node::Element(_) => None, Node::Text(ref s) => Some(s), - #[cfg(feature = "comments")] - Node::Comment(_) => None, } } @@ -145,8 +134,6 @@ impl Node { match *self { Node::Element(_) => None, Node::Text(ref mut s) => Some(s), - #[cfg(feature = "comments")] - Node::Comment(_) => None, } } @@ -168,8 +155,6 @@ impl Node { match self { Node::Element(_) => None, Node::Text(s) => Some(s), - #[cfg(feature = "comments")] - Node::Comment(_) => None, } } @@ -180,10 +165,6 @@ impl Node { Node::Text(ref s) => { writer.write_event(Event::Text(BytesText::from_plain_str(s)))?; } - #[cfg(feature = "comments")] - Node::Comment(ref s) => { - writer.write_event(Event::Comment(BytesText::from_plain_str(s)))?; - } } Ok(()) @@ -222,8 +203,6 @@ impl PartialEq for Node { match (self, other) { (&Node::Element(ref elem1), &Node::Element(ref elem2)) => elem1 == elem2, (&Node::Text(ref text1), &Node::Text(ref text2)) => text1 == text2, - #[cfg(feature = "comments")] - (&Node::Comment(ref text1), &Node::Comment(ref text2)) => text1 == text2, _ => false, } }