@@ -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,
}
}