[librsvg] xml: small cleanup



commit 61addb9390017f750c189e0faddb1de59f707d49
Author: Paolo Borelli <pborelli gnome org>
Date:   Mon Nov 11 12:08:49 2019 +0100

    xml: small cleanup

 rsvg_internals/src/xml.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/rsvg_internals/src/xml.rs b/rsvg_internals/src/xml.rs
index c7312ac1..686c4b65 100644
--- a/rsvg_internals/src/xml.rs
+++ b/rsvg_internals/src/xml.rs
@@ -224,8 +224,7 @@ impl XmlState {
                 // ^ note the space here
                 // libxml2 is not finished reading the file yet; it will emit an error
                 // on its own when it finishes.  So, ignore this condition.
-                ()
-            },
+            }
 
             Context::ElementCreation => self.element_creation_characters(text),
 
@@ -263,11 +262,12 @@ impl XmlState {
             if let Some(href) = href {
                 // FIXME: https://www.w3.org/TR/xml-stylesheet/ does not seem to specify
                 // what to do if the stylesheet cannot be loaded, so here we ignore the error.
-                if let Err(_) = inner
+                if inner
                     .document_builder
                     .as_mut()
                     .unwrap()
                     .append_stylesheet_from_xml_processing_instruction(alternate, type_, &href)
+                    .is_err()
                 {
                     rsvg_log!("invalid xml-stylesheet {} in XML processing instruction", href);
                 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]