From c9e6e3d0950671733897aadba387d40f27b53532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sat, 7 Dec 2019 17:32:48 +0100 Subject: [PATCH] minidom: Handle Node::Comment in PartialEq MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- minidom-rs/src/node.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/minidom-rs/src/node.rs b/minidom-rs/src/node.rs index 5f67502..814ada2 100644 --- a/minidom-rs/src/node.rs +++ b/minidom-rs/src/node.rs @@ -214,6 +214,8 @@ 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, } }