mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
minidom: Remove remaining Comment bits in node
They were hidden behind the flag and not showing up in tests. Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
015d0007fc
commit
5e7701f334
1 changed files with 0 additions and 21 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue