[librsvg: 2/3] parse_one_presentation_attribute() never fails; don't return a Result
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 2/3] parse_one_presentation_attribute() never fails; don't return a Result
- Date: Fri, 26 Mar 2021 00:02:45 +0000 (UTC)
commit 5122637577ce9115de611aea91e2189471623681
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Mar 25 17:34:08 2021 -0600
parse_one_presentation_attribute() never fails; don't return a Result
This is one of the functions that catches errors while processing
attribute values, and logs them as appropriate.
src/properties.rs | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/src/properties.rs b/src/properties.rs
index 2a676578..67fb2790 100644
--- a/src/properties.rs
+++ b/src/properties.rs
@@ -637,12 +637,7 @@ impl SpecifiedValues {
}
}
- #[allow(clippy::unnecessary_wraps)]
- fn parse_one_presentation_attribute(
- &mut self,
- attr: QualName,
- value: &str,
- ) -> Result<(), ElementError> {
+ fn parse_one_presentation_attribute(&mut self, attr: QualName, value: &str) {
let mut input = ParserInput::new(value);
let mut parser = Parser::new(&mut input);
@@ -723,8 +718,6 @@ impl SpecifiedValues {
);
}
}
-
- Ok(())
}
pub fn parse_presentation_attributes(
@@ -751,7 +744,7 @@ impl SpecifiedValues {
)));
}
- _ => self.parse_one_presentation_attribute(attr, value)?,
+ _ => self.parse_one_presentation_attribute(attr, value),
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]