minidom: fix boolean test

Maxime “pep” Buquet created

Issue introduced in 60ebcb8c8a425cb5f34a4f8c7afb40506d01983e.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Change summary

minidom/src/element.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

minidom/src/element.rs 🔗

@@ -711,7 +711,7 @@ impl Element {
     /// Remove the leading nodes up to the first child element and
     /// return it
     pub fn unshift_child(&mut self) -> Option<Element> {
-        while self.children.is_empty() {
+        while !self.children.is_empty() {
             if let Some(el) = self.children.remove(0).into_element() {
                 return Some(el);
             }