[librsvg] Don't erase error information in DeclParser::parse_value()



commit 59d47379d08df412528537dca59c740b7172e168
Author: Federico Mena Quintero <federico gnome org>
Date:   Tue Jan 14 13:24:23 2020 -0600

    Don't erase error information in DeclParser::parse_value()
    
    That was from the great-renaming refactor; we can now use the plain
    error returned from parse_property().

 rsvg_internals/src/css.rs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/rsvg_internals/src/css.rs b/rsvg_internals/src/css.rs
index 7cde8715..e8ea7416 100644
--- a/rsvg_internals/src/css.rs
+++ b/rsvg_internals/src/css.rs
@@ -125,8 +125,7 @@ impl<'i> DeclarationParser<'i> for DeclParser {
         input: &mut Parser<'i, 't>,
     ) -> Result<Declaration, ParseError<'i>> {
         let prop_name = QualName::new(None, ns!(), LocalName::from(name.as_ref()));
-        let property = parse_property(&prop_name, input, true)
-            .map_err(|_| input.new_custom_error(ValueErrorKind::parse_error("parse error")))?;
+        let property = parse_property(&prop_name, input, true)?;
 
         let important = input.try_parse(parse_important).is_ok();
 


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